-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e: Move cleanup and timesync to Before/After hooks
To make sure that timesync is re-enabled even if some Steps fail, move this action to After hook of the given Scenario. Do the same thing with `crc cleanup` to make sure cluster is destroyed after selected Scenarios.
- Loading branch information
1 parent
a8efd07
commit 27a19c8
Showing
5 changed files
with
57 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,18 @@ | ||
@cert_rotation @linux | ||
Feature: Certificate rotation test | ||
|
||
User starts CRC more than one month after the release. They expect | ||
User starts CRC more than 13 months after the release. They expect | ||
certificate rotation to happen successfully and to be able to deploy | ||
an app and check its accessibility. | ||
|
||
Background: Setup CRC and rewind the clock forward | ||
When executing single crc setup command succeeds | ||
And executing "sudo timedatectl set-ntp off" succeeds | ||
Then executing "sudo date -s '13 month'" succeeds | ||
And with up to "10" retries with wait period of "1s" command "virsh --readonly -c qemu:///system capabilities" output matches "^<capabilities>" | ||
|
||
@timesync @cleanup | ||
Scenario: Start CRC "in the future" and clean up | ||
Given executing single crc setup command succeeds | ||
When starting CRC with default bundle along with stopped network time synchronization succeeds | ||
Then stdout should contain "Started the OpenShift cluster" | ||
And executing "eval $(crc oc-env)" succeeds | ||
When checking that CRC is running | ||
Then login to the oc cluster succeeds | ||
Then executing "oc whoami" succeeds | ||
And stdout should contain "kubeadmin" | ||
# Set clock back to the original time | ||
When executing "sudo date -s '-13 month'" succeeds | ||
And executing "sudo timedatectl set-ntp on" succeeds | ||
# CRC delete and cleanup | ||
When executing "crc delete -f" succeeds | ||
Then stdout should contain "Deleted the instance" | ||
When executing crc cleanup command succeeds | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters