Skip to content

Commit

Permalink
e2e: patch little issues in e2e tests
Browse files Browse the repository at this point in the history
- Rephrase and update comments
- Remove story_registry.feature and include it as a scenario in story_openshift.feature
- Remove select skip-checks on Windows as they are not relevant during crc setup
  • Loading branch information
jsliacan authored and openshift-merge-robot committed Jan 19, 2023
1 parent 8e3791d commit e106cbe
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 51 deletions.
11 changes: 6 additions & 5 deletions test/e2e/features/config.feature
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,20 @@ Feature: Test configuration settings
@windows
Examples:
| property | value1 | value2 |
| skip-check-administrator-user | true | false |
| skip-check-bundle-extracted | true | false |
| skip-check-hyperv-installed | true | false |
| skip-check-hyperv-switch | true | false |
| skip-check-user-in-hyperv-group | true | false |
| skip-check-windows-version | true | false |

#| skip-check-hyperv-installed | true | false |
#| skip-check-hyperv-switch | true | false |
#| skip-check-administrator-user | true | false |
#| skip-check-windows-version | true | false |

# --------------------------------------
# Linux-specific Scenarios

@linux
Scenario: Missing CRC setup
Given executing single crc setup command succeeds
Given executing crc setup command succeeds
When executing "rm ~/.crc/bin/crc-driver-libvirt" succeeds
Then starting CRC with default bundle fails
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"
Expand Down
30 changes: 23 additions & 7 deletions test/e2e/features/story_openshift.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: 3 Openshift stories
Given ensuring CRC cluster is running succeeds
And ensuring user is logged in succeeds

# Old: End-to-end health check
# End-to-end health check

@darwin @linux @windows @startstop @testdata
Scenario: Overall cluster health
Expand Down Expand Up @@ -36,10 +36,28 @@ Feature: 3 Openshift stories
Then with up to "4" retries with wait period of "1m" http response from "http://httpd-example-testproj.apps-crc.testing" has status code "200"
And executing "oc delete project testproj" succeeds

# Old: Local image to image-registry feature
# Local image to image-registry feature

@linux @testdata
Scenario: Create local image, push to registry, deploy
@darwin @linux @windows
Scenario: Mirror image to OpenShift image registry (via oc registry login)
# mirror
When executing "oc new-project testproj-img" succeeds
And executing "oc registry login --insecure=true" succeeds
Then executing "oc image mirror registry.access.redhat.com/ubi8/httpd-24:latest=default-route-openshift-image-registry.apps-crc.testing/testproj-img/httpd-24:latest --insecure=true --filter-by-os=linux/amd64" succeeds
And executing "oc set image-lookup httpd-24" succeeds
# deploy
When executing "oc new-app testproj-img/httpd-24:latest" succeeds
When executing "oc rollout status deployment httpd-24" succeeds
Then stdout should contain "successfully rolled out"
When executing "oc get pods" succeeds
Then stdout should contain "Running"
When executing "oc logs deployment/httpd-24" succeeds
Then stdout should contain "httpd"
# cleanup
And executing "oc delete project testproj-img" succeeds

@linux
Scenario: Create local image, push to registry, deploy (via podman login)
Given checking that CRC is running
And executing "podman pull quay.io/centos7/httpd-24-centos7" succeeds
When executing "oc new-project testproj-img" succeeds
Expand All @@ -53,14 +71,12 @@ Feature: 3 Openshift stories
Then stdout should contain "Running"
When executing "oc logs deployment/hello" succeeds
Then stdout should contain "httpd"
#And executing "podman image rm quay.io/bitnami/nginx" succeeds
And executing "oc delete project testproj-img" succeeds

# Old: Operator from marketplace
# Operator from marketplace

@darwin @linux @windows @testdata
Scenario: Install new operator
Given checking that CRC is running
When executing "oc apply -f redis-sub.yaml" succeeds
Then with up to "20" retries with wait period of "30s" command "oc get csv" output matches ".*redis-operator\.(.*)Succeeded$"
# install redis operator
Expand Down
39 changes: 0 additions & 39 deletions test/e2e/features/story_registry.feature

This file was deleted.

0 comments on commit e106cbe

Please sign in to comment.