Skip to content

Commit 1dfd276

Browse files
Jakub Sliacanopenshift-merge-robot
authored andcommitted
e2e: execute crc setup as single command
Progress bar in stdout while bundle downloads during crc setup causes the entire testsuite remain stuck at that point. Circumvent this by executing `crc setup` as a 'single' command outside of the current shell environment.
1 parent 4418f9f commit 1dfd276

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

test/e2e/features/basic.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Feature: Basic test
3434
# Request start with monitoring stack
3535
* setting config property "enable-cluster-monitoring" to value "true" succeeds
3636
* setting config property "memory" to value "16000" succeeds
37-
Given executing crc setup command succeeds
37+
Given executing single crc setup command succeeds
3838
When starting CRC with default bundle succeeds
3939
Then stdout should contain "Started the OpenShift cluster"
4040
# Check if user can copy-paste login details for developer and kubeadmin users

test/e2e/features/cert_rotation.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Feature: Certificate rotation test
66
an app and check its accessibility.
77

88
Background: Setup CRC and rewind the clock forward
9-
When executing crc setup command succeeds
9+
When executing single crc setup command succeeds
1010
And executing "sudo timedatectl set-ntp off" succeeds
1111
Then executing "sudo date -s '13 month'" succeeds
1212
And with up to "10" retries with wait period of "1s" command "virsh --readonly -c qemu:///system capabilities" output matches "^<capabilities>"

test/e2e/features/config.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Feature: Test configuration settings
4141

4242
@linux @darwin @windows
4343
Scenario: CRC config checks (bundle version)
44-
Given executing crc setup command succeeds
44+
Given executing single crc setup command succeeds
4545
When setting config property "bundle" to value "current bundle" succeeds
4646
And "JSON" config file "crc.json" in CRC home folder contains key "bundle" with value matching "current bundle"
4747
And setting config property "bundle" to value "/path/to/nonexistent/bundle/crc_hypervisor_version.tar.xz" fails
@@ -110,15 +110,15 @@ Feature: Test configuration settings
110110

111111
@linux
112112
Scenario: Missing CRC setup
113-
Given executing crc setup command succeeds
113+
Given executing single crc setup command succeeds
114114
When executing "rm ~/.crc/bin/crc-driver-libvirt" succeeds
115115
Then starting CRC with default bundle fails
116116
And stderr should contain "Preflight checks failed during `crc start`, please try to run `crc setup` first in case you haven't done so yet"
117117

118118
@linux
119119
Scenario: Check network setup and destroy it, then check again
120120
When removing file "crc.json" from CRC home folder succeeds
121-
And executing crc setup command succeeds
121+
And executing single crc setup command succeeds
122122
And executing "sudo virsh net-list --name" succeeds
123123
Then stdout contains "crc"
124124
When executing "sudo virsh net-undefine crc && sudo virsh net-destroy crc" succeeds
@@ -129,7 +129,7 @@ Feature: Test configuration settings
129129
Scenario: Running `crc setup` with checks enabled restores destroyed network
130130
When executing "crc config set skip-check-crc-network false" succeeds
131131
And executing "crc config set skip-check-crc-network-active false" succeeds
132-
Then executing crc setup command succeeds
132+
Then executing single crc setup command succeeds
133133
And executing "sudo virsh net-list --name" succeeds
134134
And stdout contains "crc"
135135

test/e2e/features/proxy.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Feature: Behind proxy test
88
* executing "podman run --name squid -d -p 3128:3128 quay.io/crcont/squid" succeeds
99

1010
Scenario: Start CRC behind proxy
11-
Given executing crc setup command succeeds
11+
Given executing single crc setup command succeeds
1212
And executing "crc config set http-proxy http://192.168.130.1:3128" succeeds
1313
Then executing "crc config set https-proxy http://192.168.130.1:3128" succeeds
1414
When starting CRC with default bundle succeeds

test/e2e/testsuite/testsuite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ func EnsureCRCIsRunningSucceedsOrFails(expected string) error {
600600
return err
601601
}
602602

603-
err = ExecuteCommandWithExpectedExitStatus("setup", expected) // uses the right bundle argument if needed
603+
err = ExecuteSingleCommandWithExpectedExitStatus("setup", expected) // uses the right bundle argument if needed
604604
if err != nil {
605605
return err
606606
}

0 commit comments

Comments
 (0)