github.com/sealerio/sealer@v0.11.1-0.20240507115618-f4f89c5853ae/test/README.md (about) 1 # About 2 3 The code in this repository is a set of [Ginkgo](http://onsi.github.io/ginkgo) 4 and [Gomega](http://onsi.github.io/gomega) based integration tests that execute commands using the sealer CLI. 5 6 ## Prerequisites 7 8 Before you run the tests, you'll need a sealer binary in your machine executable path and install docker. Follow the 9 instructions [here](https://github.com/sealerio/sealer#readme) to get one. 10 11 ## Run the Tests 12 13 To run a single test or set of tests, you'll need the [Ginkgo](https://github.com/onsi/ginkgo) tool installed on your 14 machine: 15 16 ```console 17 go install github.com/onsi/ginkgo/ginkgo@v1.16.2 18 ``` 19 20 To install Sealer and prepare the test environment: 21 22 ```console 23 #build sealer source code to binary for local e2e-test in containers 24 git clone https://github.com/sealerio/sealer.git 25 cd sealer/ && make build-in-docker 26 cp _output/bin/sealer/linux_amd64/sealer /usr/local/bin 27 28 #prepare test environment 29 export REGISTRY_URL={your registry} 30 export REGISTRY_USERNAME={user name} 31 export REGISTRY_PASSWORD={password} 32 #default test image name: docker.io/sealerio/kubernetes:v1-22-15-sealerio-2 33 export IMAGE_NAME={test image name} 34 ``` 35 36 To execute the entire test suite: 37 38 ```console 39 cd sealer && ginkgo test 40 ``` 41 42 You can then use the `--focus` option to run subsets of the test suite: 43 44 ```console 45 ginkgo --focus="sealer login" test 46 ``` 47 48 You can then use the `-v` option to print out default reporter as all specs begin: 49 50 ```console 51 ginkgo -v test 52 ``` 53 54 More ginkgo helpful info see: 55 56 ```console 57 ginkgo --help 58 ```