Skip to content
This repository has been archived by the owner on Jun 9, 2019. It is now read-only.

Feature environment passthru #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Feature environment passthru #11

wants to merge 2 commits into from

Conversation

jsleeio
Copy link

@jsleeio jsleeio commented Jan 3, 2018

kubetest is ace! Thankyou!

Added an --env option to make whitelisted environment variables available to Skylark tests via an additional global environment. This will be useful in my work to pass through certain metadata into the testsuite — initially to supply information for tests concerning resource names, but I'm 100% sure there'll be further applications for it later.

I updated the example tests to demonstrate this feature.

Example invocation:

$ MINREPLICAS=8 bin/darwin/amd64/kubetest -e MINREPLICAS -t examples/tests examples/rc.yaml --verbose
INFO setting up environment passthrough            envList=MINREPLICAS
INFO environment variable                          MINREPLICAS=8
INFO examples/rc.yaml should not use latest images
WARN examples/rc.yaml ReplicationController should have at least 8 replicas

Environment variables with an empty value are not passed through at all, with the intention being that Skylark code should not have to make any more effort than if "FOO" in environment: ...

@jsleeio
Copy link
Author

jsleeio commented Jan 3, 2018

Looks like there was some kind of build-environment problem with TravisCI? 😢

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant