Skip to content

Commit

Permalink
fix marvin tests
Browse files Browse the repository at this point in the history
  • Loading branch information
harikrishna-patnala committed Sep 10, 2024
1 parent 2f847d3 commit f603974
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/integration/smoke/test_global_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,14 @@ def test_UpdateCommandsTimeoutConfigParamWithValidValue(self):
self.debug("updated the parameter %s with value %s" % (updateConfigurationResponse.name, updateConfigurationResponse.value))

listConfigurationsCmd = listConfigurations.listConfigurationsCmd()
listConfigurationsCmd.cfgName = updateConfigurationResponse.name
listConfigurationsCmd.name = updateConfigurationResponse.name
listConfigurationsResponse = self.apiClient.listConfigurations(listConfigurationsCmd)

self.assertEqual(listConfigurationsResponse.value, updateConfigurationResponse.value, "Check if the update API returned \
is the same as the one we got in the list API")
for item in listConfigurationsResponse:
if item.name == updateConfigurationResponse.name:
configParam = item

self.assertEqual(configParam.value, updateConfigurationResponse.value, "Check if the update API returned is the same as the one we got in the list API")


@attr(tags=["devcloud", "basic", "advanced"], required_hardware="false")
Expand All @@ -224,7 +227,6 @@ def test_UpdateCommandsTimeoutConfigParamWithInvalidValue(self):
self.fail("API call should have failed due to invalid format, but it succeeded.")
except Exception as e:
self.debug("Caught expected exception: %s" % str(e))
error_response = e.error
self.assertEqual(error_response['errorcode'], 431, "Expected error code 431 for invalid 21")
self.assertEqual(error_response['cserrorcode'], 4350, "Expected CS error code 4350 for value parsing failure")
self.assertIn("Validation failed", error_response['errortext'], "Expected error message related to format validation")
error_message = str(e)
self.assertIn("errorCode: 431", error_message, "Expected error code 431 for invalid format")
self.assertIn("Validation failed", error_message, "Expected validation failure message")

0 comments on commit f603974

Please sign in to comment.