| 1 | # Overview |
| 2 | |
| 3 | The container includes the e2e binary for all 3 platforms plus the required resources to run it. |
| 4 | |
| 5 | The container connects through ssh to the target host and copy the right binary for the platform, run e2e tests and pick the results and logs back. |
| 6 | |
| 7 | ## Envs |
| 8 | |
| 9 | **PLATFORM**:*define target platform (windows, macos, linux).* |
| 10 | **ARCH**:*define target arch (amd64, arm64). Default amd64 |
| 11 | **TARGET_HOST**:*dns or ip for the target host.* |
| 12 | **TARGET_HOST_USERNAME**:*username for target host.* |
| 13 | **TARGET_HOST_KEY_PATH**:*private key for user. (Mandatory if not TARGET_HOST_PASSWORD).* |
| 14 | **TARGET_HOST_PASSWORD**:*password for user. (Mandatory if not TARGET_HOST_KEY_PATH).* |
| 15 | **PULL_SECRET_FILE_PATH**: *pull secret file path (local to container).* |
| 16 | **BUNDLE_VERSION**:*(Mandatory if not BUNDLE_LOCATION). Testing agaisnt crc released version bundle version for crc released version.* |
| 17 | **BUNDLE_LOCATION**:*(Mandatory if not BUNDLE_VERSION). When testing crc with custom bundle set the bundle location on target server.* |
| 18 | **RESULTS_PATH**:*(Optional). Path inside container to pick results and logs from e2e execution.* |
| 19 | **RESULTS_FILE**:*(Optional). File name for results xunit results. Default value: e2e.* |
| 20 | **CLEANUP_HOME**:*(Optional). Cleanup crc home folder or keep as it is to run test.* |
| 21 | **E2E_TAG_EXPRESSION**:*(Optional). Define e2e tag expression to select tests. If empty all tests available for the platform will be executed.* |
| 22 | |
| 23 | ## Samples |
| 24 | |
| 25 | ```bash |
| 26 | # Run e2e on macos platform with ssh key and custom bundle |
| 27 | podman run --rm -it --name crc-e2e \ |
| 28 | -e PLATFORM=macos \ |
| 29 | -e TARGET_HOST=$IP \ |
| 30 | -e TARGET_HOST_USERNAME=$USER \ |
| 31 | -e TARGET_HOST_KEY_PATH=/opt/crc/id_rsa \ |
| 32 | -e PULL_SECRET_FILE_PATH=/opt/crc/pull-secret \ |
| 33 | -e BUNDLE_LOCATION=/bundles/crc_hyperv_4.8.0-rc.3.crcbundle \ |
| 34 | -v $PWD/pull-secret:/opt/crc/pull-secret:Z \ |
| 35 | -v $PWD/id_rsa:/opt/crc/id_rsa:Z \ |
| 36 | -v $PWD/output:/output:Z \ |
| 37 | quay.io/crcont/crc-e2e:v1.29.0-465452f4 |
| 38 | |
| 39 | # Run e2e on windows platform with ssh password and crc released version |
| 40 | podman run --rm -it --name crc-e2e \ |
| 41 | -e PLATFORM=windows \ |
| 42 | -e TARGET_HOST=$IP \ |
| 43 | -e TARGET_HOST_USERNAME=$USER \ |
| 44 | -e TARGET_HOST_PASSWORD=$PASSWORD \ |
| 45 | -e PULL_SECRET_FILE_PATH=/opt/crc/pull-secret \ |
| 46 | -e BUNDLE_VERSION=4.7.18 \ |
| 47 | -v $PWD/pull-secret:/opt/crc/pull-secret:Z \ |
| 48 | -v $PWD/output:/output:Z \ |
| 49 | quay.io/crcont/crc-e2e:v1.29.0-465452f4 |
| 50 | ``` |