Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix agent update UT #3051

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/ga/test_agent_update_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ def test_it_should_continue_with_update_if_number_of_update_attempts_less_than_3
with self.assertRaises(AgentUpgradeExitException):
agent_update_handler._protocol.mock_wire_data.set_version_in_agent_family(
str(latest_version))
agent_update_handler._protocol.mock_wire_data.set_version_in_ga_manifest(str(latest_version))
agent_update_handler._protocol.mock_wire_data.set_incarnation(i+2)
agent_update_handler._protocol.client.update_goal_state()
agent_update_handler.run(agent_update_handler._protocol.get_goal_state(), True)
Expand Down
2 changes: 1 addition & 1 deletion tests/ga/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -1849,7 +1849,7 @@ def reload_conf(url, protocol):
data_file['ga_manifest'] = "wire/ga_manifest_no_upgrade.xml"
# Setting the prod frequency to mimic a real scenario
with self.__get_update_handler(iterations=no_of_iterations, test_data=data_file, reload_conf=reload_conf, autoupdate_frequency=6000) as (update_handler, mock_telemetry):
update_handler._protocol.mock_wire_data.set_ga_manifest_version_version(str(CURRENT_VERSION))
update_handler._protocol.mock_wire_data.set_version_in_ga_manifest(str(CURRENT_VERSION))
update_handler._protocol.mock_wire_data.set_incarnation(20)
update_handler.run(debug=True)

Expand Down
2 changes: 1 addition & 1 deletion tests/lib/wire_protocol_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,5 +469,5 @@ def set_version_in_agent_family(self, version):
def set_extension_config_is_vm_enabled_for_rsm_upgrades(self, is_vm_enabled_for_rsm_upgrades):
self.ext_conf = WireProtocolData.replace_xml_element_value(self.ext_conf, "IsVMEnabledForRSMUpgrades", is_vm_enabled_for_rsm_upgrades)

def set_ga_manifest_version_version(self, version):
def set_version_in_ga_manifest(self, version):
self.ga_manifest = WireProtocolData.replace_xml_element_value(self.ga_manifest, "Version", version)
Loading