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

Run remote date command to get test case start time #2993

Merged
merged 3 commits into from
Dec 20, 2023
Merged
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
11 changes: 5 additions & 6 deletions tests_e2e/tests/agent_ext_workflow/extension_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

from azure.mgmt.compute.models import VirtualMachineExtensionInstanceView
from assertpy import assert_that, soft_assertions
from datetime import datetime
from random import choice
import uuid

Expand Down Expand Up @@ -175,7 +174,7 @@ def run(self):
log.info("*******Verifying the extension install scenario*******")

# Record the time we start the test
start_time = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
start_time = self._ssh_client.run_command("date '+%Y-%m-%dT%TZ'").rstrip()

# Create DcrTestExtension with version 1.1.5
dcr_test_ext_id_1_1 = VmExtensionIdentifier(
Expand Down Expand Up @@ -224,7 +223,7 @@ def run(self):
log.info("*******Verifying the extension enable scenario*******")

# Record the time we start the test
start_time = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
start_time = self._ssh_client.run_command("date '+%Y-%m-%dT%TZ'").rstrip()

# Enable test extension on the VM
dcr_ext.modify_ext_settings_and_enable()
Expand Down Expand Up @@ -281,7 +280,7 @@ def run(self):
log.info("*******Verifying the extension uninstall scenario*******")

# Record the time we start the test
start_time = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
start_time = self._ssh_client.run_command("date '+%Y-%m-%dT%TZ'").rstrip()

# Remove the test extension on the VM
log.info("Delete %s from VM", dcr_test_ext_client)
Expand All @@ -306,7 +305,7 @@ def run(self):
log.info("*******Verifying the extension update with install scenario*******")

# Record the time we start the test
start_time = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
start_time = self._ssh_client.run_command("date '+%Y-%m-%dT%TZ'").rstrip()

# Version 1.2.0 of the test extension has the same functionalities as 1.1.5 with
# "updateMode": "UpdateWithInstall" in HandlerManifest.json to test update case
Expand Down Expand Up @@ -373,7 +372,7 @@ def run(self):
log.info("*******Verifying the extension update without install scenario*******")

# Record the time we start the test
start_time = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
start_time = self._ssh_client.run_command("date '+%Y-%m-%dT%TZ'").rstrip()

# Version 1.3.0 of the test extension has the same functionalities as 1.1.5 with
# "updateMode": "UpdateWithoutInstall" in HandlerManifest.json to test update case
Expand Down
Loading