def test_add_dir(self):
        newdir = 'quux'
        # Change to the repo dir
        newdir_path = os.path.join(self.repo, newdir)
        _makedirs(newdir_path)
        files = [os.path.join(newdir_path, x) for x in self.files]
        files_relpath = [os.path.join(newdir, x) for x in self.files]
        for path in files:
            with open(path, 'w') as fp_:
                fp_.write(
                    'This is a test file with relative path {0}.\n'
                    .format(path)
                )
        ret = self.run_function('git.add', [self.repo, newdir])
        self.assertEqual(
            ret,
            '\n'.join(
                sorted(['add \'{0}\''.format(x)
                        for x in files_relpath])
            )
        )
Test git.add with a directory
dataset/ETHPy150Open saltstack/salt/tests/integration/modules/git.py/GitModuleTest.test_add_dir