Skip to content

Commit b5ae93f

Browse files
cfergeaupraveenkumar
authored andcommitted
e2e: Perform crc setup after moving the clock 3 months ahead
The cert renewal e2e test moves the clock 3 months ahead in order to make sure certificate renewal is working as expected. However, `crc setup` is run during the time travel. Since `crc setup` can try to create TLS connections to public servers (when using 'yum' for example), this could fail unexpectedly as the certificates used by these public servers may not be valid for 3 more months. This commit moves crc setup before the date change to avoid such issues. After the reordering, a short wait is needed for libvirt to become available again, as `date -s "5 minutes" && virsh hostname` is failing for a few seconds after the time jump.
1 parent 9f83839 commit b5ae93f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/e2e/features/cert_rotation.feature

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ Feature: Certificate rotation test
55
certificate rotation to happen successfully and to be able to deploy
66
an app and check its accessibility.
77

8+
Scenario: Setup CRC
9+
Given executing "crc setup" succeeds
10+
811
Scenario: Set clock to 3 months ahead on the host
912
Given executing "sudo timedatectl set-ntp off" succeeds
1013
Then executing "sudo date -s '3 month'" succeeds
14+
And with up to "10" retries with wait period of "1s" command "virsh --readonly -c qemu:///system capabilities" output matches "^<capabilities>"
1115

1216
Scenario: Start CRC
13-
Given executing "crc setup" succeeds
1417
When starting CRC with default bundle along with stopped network time synchronization succeeds
1518
Then stdout should contain "Started the OpenShift cluster"
1619
And executing "eval $(crc oc-env)" succeeds

0 commit comments

Comments
 (0)