-
Git
-
Make
-
A recent Go distribution (>=1.11)
Note
|
You should be able to develop the project on Linux, Windows, or macOS. |
Get the sources from GitHub:
$ git clone https://github.com/code-ready/crc.git
Note
|
Do not keep the source code in your |
CodeReady Containers uses Go modules for dependency management.
For more information, see the following:
We have automated integration tests which keep CodeReady Containers in shape.
Integration tests use the Clicumber package to provide basic functionality for testing CLI binaries.
Clicumber allows running commands in a persistent shell instance (bash
, tcsh
, zsh
, Command Prompt, or PowerShell), assert its outputs (standard output, standard error, or exit code), check configuration files, and so on. The general functionality of Clicumber is then extended by CodeReady Containers specific test code to cover the whole functionality of CodeReady Containers.
First, one needs to set the following flags in Makefile
, under integration
target:
-
--pull-secret-file
: absolute path to your OpenShift pull secret. -
--bundle-location
: if bundle is embedded, this flag should be set to--bundle-location=embedded
or not passed at all; if bundle is not embedded, then absolute path to the bundle should be passed. -
--crc-binary
: ifcrc
binary resides in$GOPATH/bin
, then this flag needs not be passed; otherwise absolute path to thecrc
binary should be passed.
To start integrationt tests, run:
$ make integration
Implicitly, all integration tests for your operating system are executed. If you want to run only tests from one feature file, you have to override GODOG_OPTS
environment variable. For example:
make integration GODOG_OPTS="--godog.tags='@basic && @windows'" BUNDLE_LOCATION=<bundle location> PULL_SECRET_FILE=<pull secret path>
Please notice @basic && @windows
, where @basic
tag stands for basic.feature
file and @windows
tag for integration tests designed for Windows.