Beispiel #1
0
    def test_dir_list(self):
        empty_dir = os.path.join(integration.TMP_STATE_TREE, 'empty_dir')
        if integration.TMP_STATE_TREE not in self.master_opts['file_roots'][
                'base']:
            self.skipTest(
                'This test fails when using tests/runtests.py. salt-runtests will be available soon.'
            )

        empty_dir = os.path.join(integration.TMP_STATE_TREE, 'empty_dir')
        if not os.path.isdir(empty_dir):
            # There's no use creating the empty-directory ourselves at this
            # point, the minions have already synced, it wouldn't get pushed to
            # them
            self.skipTest(
                'This test fails when using tests/runtests.py. salt-runtests will be available soon.'
            )

        with patch.dict(
                roots.__opts__, {
                    'cachedir': self.master_opts['cachedir'],
                    'file_roots': self.master_opts['file_roots'],
                    'fileserver_ignoresymlinks': False,
                    'fileserver_followsymlinks': False,
                    'file_ignore_regex': False,
                    'file_ignore_glob': False
                }):
            ret = roots.dir_list({'saltenv': 'base'})
            self.assertIn('empty_dir', ret)
Beispiel #2
0
 def test_dir_list(self):
     empty_dir = self.tmp_state_tree / "empty_dir"
     if not empty_dir.is_dir():
         empty_dir.mkdir()
     self.addCleanup(salt.utils.files.rm_rf, str(empty_dir))
     ret = roots.dir_list({"saltenv": "base"})
     self.assertIn("empty_dir", ret)
     self.assertIn(UNICODE_DIRNAME, ret)
Beispiel #3
0
 def test_dir_list(self):
     with patch.dict(roots.__opts__, {'file_roots': self.master_opts['file_roots'],
                              'fileserver_ignoresymlinks': False,
                              'fileserver_followsymlinks': False,
                              'file_ignore_regex': False,
                              'file_ignore_glob': False}):
         ret = roots.dir_list({'saltenv': 'base'})
         self.assertIn('empty_dir', ret)
Beispiel #4
0
 def test_dir_list(self):
     with patch.dict(
             roots.__opts__, {
                 'file_roots': self.master_opts['file_roots'],
                 'fileserver_ignoresymlinks': False,
                 'fileserver_followsymlinks': False,
                 'file_ignore_regex': False,
                 'file_ignore_glob': False
             }):
         ret = roots.dir_list({'saltenv': 'base'})
         self.assertIn('empty_dir', ret)
Beispiel #5
0
 def test_dir_list(self):
     with patch.dict(
         roots.__opts__,
         {
             "file_roots": self.master_opts["file_roots"],
             "fileserver_ignoresymlinks": False,
             "fileserver_followsymlinks": False,
             "file_ignore_regex": False,
             "file_ignore_glob": False,
         },
     ):
         ret = roots.dir_list({"saltenv": "base"})
         self.assertIn("empty_dir", ret)
Beispiel #6
0
 def test_dir_list(self):
     if integration.TMP_STATE_TREE not in self.master_opts['file_roots'][
             'base']:
         self.skipTest(
             'This test fails when using tests/runtests.py. salt-runtests will be available soon.'
         )
     with patch.dict(
             roots.__opts__, {
                 'cachedir': self.master_opts['cachedir'],
                 'file_roots': self.master_opts['file_roots'],
                 'fileserver_ignoresymlinks': False,
                 'fileserver_followsymlinks': False,
                 'file_ignore_regex': False,
                 'file_ignore_glob': False
             }):
         ret = roots.dir_list({'saltenv': 'base'})
         self.assertIn('empty_dir', ret)
Beispiel #7
0
    def test_dir_list(self):
        empty_dir = os.path.join(integration.TMP_STATE_TREE, 'empty_dir')
        if integration.TMP_STATE_TREE not in self.master_opts['file_roots']['base']:
            self.skipTest('This test fails when using tests/runtests.py. salt-runtests will be available soon.')

        empty_dir = os.path.join(integration.TMP_STATE_TREE, 'empty_dir')
        if not os.path.isdir(empty_dir):
            # There's no use creating the empty-directory ourselves at this
            # point, the minions have already synced, it wouldn't get pushed to
            # them
            self.skipTest('This test fails when using tests/runtests.py. salt-runtests will be available soon.')

        with patch.dict(roots.__opts__, {'cachedir': self.master_opts['cachedir'],
                                         'file_roots': self.master_opts['file_roots'],
                                         'fileserver_ignoresymlinks': False,
                                         'fileserver_followsymlinks': False,
                                         'file_ignore_regex': False,
                                         'file_ignore_glob': False}):
            ret = roots.dir_list({'saltenv': 'base'})
            self.assertIn('empty_dir', ret)
Beispiel #8
0
 def test_dir_list(self):
     ret = roots.dir_list({'saltenv': 'base'})
     self.assertIn('empty_dir', ret)
     self.assertIn(UNICODE_DIRNAME, ret)
Beispiel #9
0
 def test_dir_list(self):
     ret = roots.dir_list({"saltenv": "base"})
     self.assertIn("empty_dir", ret)
     self.assertIn(UNICODE_DIRNAME, ret)