Skip to content

Commit

Permalink
Move enable increment to beginning of function
Browse files Browse the repository at this point in the history
  • Loading branch information
maddieford committed Jul 3, 2023
1 parent bf4cf31 commit 9010e01
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests_e2e/tests/agent_ext_workflow/extension_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@ def __init__(self, extension: VirtualMachineExtensionClient, ssh_client: SshClie
self.data = None

def modify_ext_settings_and_enable(self, data=None):
self.enable_count += 1

# Settings follows the following format: [ExtensionName]-[Version], Count: [Enable-count]
setting_name = "%s-%s, %s: %s" % (self.name, self.version, self.COUNT_KEY_NAME, self.enable_count)
# We include data in the settings to test the special characters case. The settings format with data
# follows the following format: [ExtensionName]-[Version], Count: [Enable-count], data: [data]
# We include data in the settings to test the special characters case. The settings with data follows the
# following format: [ExtensionName]-[Version], Count: [Enable-count], data: [data]
if data is not None:
setting_name = "{0}, {1}: {2}".format(setting_name, self.DATA_KEY_NAME, data)

self.enable_count += 1
self.expected_message = setting_name
settings = {self.NAME_KEY_NAME: setting_name.encode('utf-8')}

Expand Down

0 comments on commit 9010e01

Please sign in to comment.