def test_when_check_connector_backend_access_is_failed(self, mocks_dict): mocks_dict[ 'check_connector_backend_access'].side_effect = utils.create_fn_raising_error( FakeErrors.FAKE_ERR_MSG) exp_output = 'Check connector backend host error: {}'.format( FakeErrors.FAKE_ERR_MSG) self._check_internal_fn_causes_systemexit(mocks_dict, exp_output)
def test_when_create_ingress_is_failed(self, mocks_dict): mocks_dict[ 'create_ingress'].side_effect = utils.create_fn_raising_error( FakeErrors.FAKE_ERR_MSG) exp_output = "Can't create ingress in cluster, error: {}".format( FakeErrors.FAKE_ERR_MSG) self._check_internal_fn_causes_systemexit(mocks_dict, exp_output)
def test_when_polling_service_access_is_failed(self, mocks_dict): mocks_dict[ 'polling_service_access'].side_effect = utils.create_fn_raising_error( FakeErrors.FAKE_ERR_MSG) exp_output = 'Service expose FAILED, error: {}'.format( FakeErrors.FAKE_ERR_MSG) self._check_internal_fn_causes_systemexit(mocks_dict, exp_output)
def test_when_create_secret_failed(self, mocks_dict): err_txt = 'encoding or errors without a string argument' mocks_dict[ 'create_secret'].side_effect = utils.create_fn_raising_error( err_txt) exp_output = "Can't create config in cluster, error: {}".format( err_txt) self._check_internal_fn_causes_systemexit(mocks_dict, exp_output)
def test_when_create_image_pull_secret_failed(self, mocks_dict): err_txt = 'encoding or errors without a string argument' mocks_dict['create_image_pull_secret'].side_effect = utils.create_fn_raising_error(err_txt) self.assertRaises(SystemExit)