This adds cluster tests for "kompose up" and "kompose down" for
Kubernetes. At the moment this checks that they are deployable to a
single-node Kubernetes cluster.
More proficient tests such as testing if the pods are actually up will
be added in the future.
You can test this by running: `make test-ci` on your local-machine.
Furthermore, we'll eventually have this enabled on Fabric8 / CentOS CI /
Semaphore (whatever comes first) so we can have a full end-to-end
testing environment.
Updates the script to properly format the table (had a bit of a
shortcoming doing that) as well as remove the leftover file
install_guide.txt as it's generated for release notes.
Fixes the issues in regards to rediction.
For example, supplying `/docs/conversion` within the user guide the link
will appear as a 404.
Adding this allows redirection from `/docs/conversion` to `/conversion`.
This adds support for building and pushing docker containers
when you perform either `kompose convert` or `kompose up`.
Docker Compose files who have build parameters with their respective
image and build keys will automatically be both built and pushed.
This does a major refactor on the compose.go functions as well as brings
in a new era of v3 support to Kompose.
Similar to how we utilize libcompose, we utilize docker/cli's "stack
deploy" code which has a built-in v3 parser. We convert the parsed
structure to our own and then convert it to Kubernetes/OpenShift
artifacts.
If test in `make test-cmd` is failing, now it will show diff so that
it will be easy to debug.
for example,
```
===> Starting test <===
convert::expect_success_and_warning: Running: 'kompose -f /home/snarwade/go/src/github.com/kubernetes-incubator/kompose/script/test/fixtures/service-name-change/docker-compose.yml convert --stdout -j' expected_output: '/home/snarwade/go/src/github.com/kubernetes-incubator/kompose/script/test/fixtures/service-name-change/output-k8s.json' expected_warning: 'Unsupported root level volumes key - ignoring'
WARN Unsupported root level volumes key - ignoring
WARN Unsupported depends_on key - ignoring
103c103
< "value": "bitnami_wordpres"
---
> "value": "bitnami_wordpress"
FAIL: converted output does not match
```
* Two new scripts testing kompose-specific labels have been added:
script/test_in_openshift/tests/routes-service-expose-hostname.sh
script/test_in_openshift/tests/routes-service-expose-true.sh
* Tests for buildconfig dockerfile construct has been added:
script/test_in_openshift/tests/buildconfig_dockerfile.sh
* Tests for restart option:
script/test_in_openshift/tests/restart-options.sh
* Ability to run individual scripts: Changes have been made to script/test_in_openshift/run.sh
for running individual scripts:
Eg. ./script/test_in_openshift/run.sh script/test_in_openshift/tests/routes-service-expose-true.sh
now args provided under build in docker-compose file can be available in buildconfig.
it solves #406
Added unit test and functional test
solves #445
Separated key:"value" pairs by spaces
Resolves#576
This PR includes `output-os-template.json` in `nginx-node-redis` example,
which is basically output template contains `%URI%` and `%REF%` variables
which will be filled while initializing test cases and new will be stored as
`/tmp/output-os.json`
This will remove the problem of git uri and ref.
* 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'