forked from LaconicNetwork/kompose
Adding OpenShift functional tests for kompose up/down
* This PR adds functional tests for kompose up/down. The test scripts
are hosted under script/test_in_openshift. The directory structure,
as follows:
script/test_in_openshift/
├── compose-files
│ └── docker-compose-command.yml
├── lib.sh
├── run.sh
└── tests
├── buildconfig.sh
├── entrypoint-command.sh
├── etherpad.sh
└── redis-replica-2.sh
* script/test_in_openshift/run.sh is the master script
which executes all the tests
* script/test_in_openshift/lib.sh consists of helper functions
for `kompose up` and `kompose down` checks
* script/test_in_openshift/tests directory consists of test scripts
* The scripts use 'oc cluster up' for setting up a single-machine
OpenShift cluster. It exits if oc binaries are not installed
* Most of the docker compose files used are the ones already
available in examples/ or script/test/fixtures.
* How to run the tests: 'make test-openshift'
This commit is contained in:
@@ -55,6 +55,12 @@ test-unit-cover:
|
||||
# generate go test commands using go list and run go test for every package separately
|
||||
go list -f '"go test -race -cover -v -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"' github.com/kubernetes-incubator/kompose/... | grep -v "vendor" | xargs -L 1 -P4 sh -c
|
||||
|
||||
|
||||
# run openshift up/down tests
|
||||
.PHONY: test-openshift
|
||||
test-openshift:
|
||||
./script/test_in_openshift/run.sh
|
||||
|
||||
# run commandline tests
|
||||
.PHONY: test-cmd
|
||||
test-cmd:
|
||||
@@ -89,7 +95,7 @@ test: check-vendor validate test-unit-cover install test-cmd
|
||||
.PHONY: test-image
|
||||
test-image:
|
||||
docker build -t $(TEST_IMAGE) -f script/test_in_container/Dockerfile script/test_in_container/
|
||||
|
||||
|
||||
# run all test localy in docker image (image can be build by by build-test-image target)
|
||||
.PHONY: test-container
|
||||
test-container:
|
||||
|
||||
Reference in New Issue
Block a user