kompose/script/test_in_openshift
namusyaka 3772612ff9
GitHub Actions Part2 (#1356)
* Update CI badge

* Update CI target

* Add TODO comment

* Create .coverprofile for each directory

Re:running tests resolve 0% coverage issue.
2020-11-30 14:48:09 +08:00
..
compose-files Fix image build path error 2018-02-24 15:40:00 +08:00
tests Fix image build path error 2018-02-24 15:40:00 +08:00
lib.sh GitHub Actions Part2 (#1356) 2020-11-30 14:48:09 +08:00
README.md Adding documentation for tests 2017-10-11 19:58:53 +05:30
run.sh Migrate CI from travis ci to github actions (#1355) 2020-11-16 11:47:55 +08:00

Functional tests for Kompose on OpenShift

Introduction

The functional tests for Kompose on OpenShift cluster leverages oc cluster up to bring a single-cluster OpenShift instance. The test scripts are hosted under script/test_in_openshift.

The directory structure is as below:

        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
                └── ..
  • run.sh is the master script which executes all the tests.

  • lib.sh consists of helper functions for kompose up and kompose down checks.

  • tests/ directory contains the test scripts.

  • compose-files/ directory contains the docker compose file used by the test scripts.

  • The scripts use oc cluster up for setting up a single-machine OpenShift cluster. It exits if oc binaries are not installed.

  • Docker Compose examples are available under [examples/](/examples] or /script/test/fixtures.

Running OpenShift tests

Deploy oc cluster up

The scripts use oc cluster up for setting up a single-machine OpenShift cluster. Installing oc binary is a pre-requisite for running these tests.

Use make test-openshift to run the OpenShift tests.

Adding OpenShift tests