示例#1
0
 def test_pf_not_ok_all_success(self):
     result = {
         '1': {'succeeded': True},
         '2': {'succeeded': True},
         '3': {'succeeded': True},
     }
     self.assertEquals(LIVEACTION_STATUS_SUCCEEDED,
                       FabricRunner._get_result_status(result, False))
示例#2
0
 def test_pf_ok_all_fail(self):
     result = {
         '1': {'succeeded': False},
         '2': {'succeeded': False},
         '3': {'succeeded': False},
     }
     self.assertEquals(LIVEACTION_STATUS_FAILED,
                       FabricRunner._get_result_status(result, True))
示例#3
0
    def test_pf_ok_some_success(self):
        result = {
            '1': {
                'succeeded': False
            },
            '2': {
                'succeeded': True
            },
            '3': {
                'succeeded': False
            },
        }
        self.assertEquals(ACTIONEXEC_STATUS_SUCCEEDED,
                          FabricRunner._get_result_status(result, True))

        result = {
            '1': {
                'succeeded': True
            },
            '2': {
                'succeeded': False
            },
            '3': {
                'succeeded': False
            },
        }
        self.assertEquals(ACTIONEXEC_STATUS_SUCCEEDED,
                          FabricRunner._get_result_status(result, True))

        result = {
            '1': {
                'succeeded': False
            },
            '2': {
                'succeeded': False
            },
            '3': {
                'succeeded': True
            },
        }
        self.assertEquals(ACTIONEXEC_STATUS_SUCCEEDED,
                          FabricRunner._get_result_status(result, True))
示例#4
0
    def test_pf_not_ok_some_success(self):
        result = {
            '1': {
                'succeeded': False
            },
            '2': {
                'succeeded': True
            },
            '3': {
                'succeeded': False
            },
        }
        self.assertEquals(LIVEACTION_STATUS_FAILED,
                          FabricRunner._get_result_status(result, False))

        result = {
            '1': {
                'succeeded': True
            },
            '2': {
                'succeeded': False
            },
            '3': {
                'succeeded': False
            },
        }
        self.assertEquals(LIVEACTION_STATUS_FAILED,
                          FabricRunner._get_result_status(result, False))

        result = {
            '1': {
                'succeeded': False
            },
            '2': {
                'succeeded': False
            },
            '3': {
                'succeeded': True
            },
        }
        self.assertEquals(LIVEACTION_STATUS_FAILED,
                          FabricRunner._get_result_status(result, False))
示例#5
0
 def test_pf_ok_all_fail(self):
     result = {
         '1': {
             'succeeded': False
         },
         '2': {
             'succeeded': False
         },
         '3': {
             'succeeded': False
         },
     }
     self.assertEquals(ACTIONEXEC_STATUS_FAILED,
                       FabricRunner._get_result_status(result, True))
示例#6
0
 def test_pf_ok_all_success(self):
     result = {
         '1': {
             'succeeded': True
         },
         '2': {
             'succeeded': True
         },
         '3': {
             'succeeded': True
         },
     }
     self.assertEquals(LIVEACTION_STATUS_SUCCEEDED,
                       FabricRunner._get_result_status(result, True))