Skip to content

Commit

Permalink
test (e2e) : update basic scenario to skip manpages check on windows (#…
Browse files Browse the repository at this point in the history
…4608)

+ Update manpages step in basic scenario to skip execution for windows
+ Instead of relying of man command output, only verify whether we've generated the man pages files correctly in the directory.

Signed-off-by: Rohan Kumar <[email protected]>
  • Loading branch information
rohanKanojia committed Feb 13, 2025
1 parent b03610c commit dbc4d72
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
2 changes: 0 additions & 2 deletions test/e2e/features/basic.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Feature: Basic test
* setting config property "enable-cluster-monitoring" to value "true" succeeds
* setting config property "memory" to value "16000" succeeds
Given executing single crc setup command succeeds
And executing "man -P cat crc" succeeds
When starting CRC with default bundle succeeds
Then stdout should contain "Started the OpenShift cluster"
# Check if user can copy-paste login details for developer and kubeadmin users
Expand Down Expand Up @@ -74,4 +73,3 @@ Feature: Basic test
And kubeconfig is cleaned up
# cleanup
When executing crc cleanup command succeeds
And executing "man -P cat crc" fails
62 changes: 62 additions & 0 deletions test/e2e/features/manpages.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@story_manpages
Feature: Check generation and cleanup of manpages

@linux @darwin @cleanup
Scenario: verify man pages are generated after crc setup and deleted on cleanup
When executing single crc setup command succeeds
Then executing "man -P cat crc-bundle-generate" succeeds
And stdout should contain "Generate a custom bundle from the running OpenShift cluster"
Then executing "man -P cat crc-config" succeeds
And stdout should contain "Modify crc configuration"
Then executing "man -P cat crc-start" succeeds
And stdout should contain "Start the instance"
Then executing "man -P cat crc-bundle" succeeds
And stdout should contain "Manage CRC bundles"
Then executing "man -P cat crc-console" succeeds
And stdout should contain "Open the OpenShift Web Console in the default browser"
Then executing "man -P cat crc-status" succeeds
And stdout should contain "Display status of the OpenShift cluster"
Then executing "man -P cat crc-cleanup" succeeds
And stdout should contain "Undo config changes"
Then executing "man -P cat crc-delete" succeeds
And stdout should contain "Delete the instance"
Then executing "man -P cat crc-stop" succeeds
And stdout should contain "Stop the instance"
Then executing "man -P cat crc-config-get" succeeds
And stdout should contain "Get a crc configuration property"
Then executing "man -P cat crc-ip" succeeds
And stdout should contain "Get IP address of the running OpenShift cluster"
Then executing "man -P cat crc-version" succeeds
And stdout should contain "Print version information"
Then executing "man -P cat crc-config-set" succeeds
And stdout should contain "Set a crc configuration property"
Then executing "man -P cat crc-oc-env" succeeds
And stdout should contain "Add the 'oc' executable to PATH"
Then executing "man -P cat crc-config-unset" succeeds
And stdout should contain "Unset a crc configuration property"
Then executing "man -P cat crc-podman-env" succeeds
And stdout should contain "Setup podman environment"
Then executing "man -P cat crc-config-view" succeeds
And stdout should contain "Display all assigned crc configuration properties"
Then executing "man -P cat crc-setup" succeeds
And stdout should contain "Set up prerequisites for using CRC"

When executing crc cleanup command succeeds
Then executing "man -P cat crc-bundle-generate" fails
Then executing "man -P cat crc-config" fails
Then executing "man -P cat crc-start" fails
Then executing "man -P cat crc-bundle" fails
Then executing "man -P cat crc-console" fails
Then executing "man -P cat crc-status" fails
Then executing "man -P cat crc-cleanup" fails
Then executing "man -P cat crc-delete" fails
Then executing "man -P cat crc-stop" fails
Then executing "man -P cat crc-config-get" fails
Then executing "man -P cat crc-ip" fails
Then executing "man -P cat crc-version" fails
Then executing "man -P cat crc-config-set" fails
Then executing "man -P cat crc-oc-env" fails
Then executing "man -P cat crc-config-unset" fails
Then executing "man -P cat crc-podman-env" fails
Then executing "man -P cat crc-config-view" fails
Then executing "man -P cat crc-setup" fails

0 comments on commit dbc4d72

Please sign in to comment.