Exemple #1
0
 def test_collect_remotepath_failure(self):
     """ Test if RemotePathNotExistError is raised when remote path doesn't exist """
     testfile1 = os.path.join(self.currdir, "files", "failure", "remote_path.yml")
     with self.assertRaises(RemotePathNotExistError):
         core = Core()
         core.load(testfile1, self.reportsdir)
         core.collect.run()
Exemple #2
0
 def test_deploy_localpath_failure(self):
     """ Test if LocalPathNotExistError is raised when localpath doesn't exist """
     testfile = os.path.join(self.currdir, "files", "failure", "local_path.yml")
     with self.assertRaises(LocalPathNotExistError):
         core = Core()
         core.load(testfile, self.reportsdir)
         core.deploy.run()
Exemple #3
0
    def test_core_collect_success(self):
        """ Test collect stage when it success """
        testfile = os.path.join(self.currdir, "files", "success", "collect.yml")
        core = Core()
        core.load(testfile, self.reportsdir)

        self.assertIsNotNone(core.collect)
        self.assertFalse(core.collect.run())
Exemple #4
0
    def test_core_execute_success(self):
        """ Test execute stage when it success """
        testfile = os.path.join(self.currdir, "files", "success", "execute.yml")
        core = Core()
        core.load(testfile, self.reportsdir)

        self.assertIsNotNone(core.execute)
        self.assertFalse(core.execute.run())
Exemple #5
0
    def test_core_deploy_success(self):
        """ Test deploy stage when it success """
        testfile = os.path.join(self.currdir, "files", "success", "deploy.yml")
        core = Core()
        core.load(testfile, self.reportsdir)

        self.assertIsNotNone(core.deploy)
        self.assertFalse(core.deploy.run())
        self.assertFalse(core.deploy.cleanup())
Exemple #6
0
 def test_core_collect_failure(self):
     """ Test if FileParseError is raised when collect is bad formatted """
     testfile = os.path.join(self.currdir, "files", "failure", "collect.yml")
     with self.assertRaises(FileParseError):
         core = Core()
         core.load(testfile, self.reportsdir)
Exemple #7
0
 def test_core_execute_failure(self):
     """ Test if FileParseError is raised when execute is wrong """
     testfile = os.path.join(self.currdir, "files", "failure", "execute.yml")
     with self.assertRaises(FileParseError):
         core = Core()
         core.load(testfile, self.reportsdir)