cekit / behave-test-steps

MIT License
0 stars 22 forks source link

Make S2i steps parameters configurable by env variables. #35

Open jfdenise opened 3 years ago

jfdenise commented 3 years ago

We are in a case where tests scenarii could be shared by multiple images if the s2i build step was configurable (eg: build src repo, tag, context-dir, ...). A user could write something like: Given s2i build $BEHAVE_TEST_REPO from $BEHAVE_TEST_APP1 using $BEHAVE_TEST_REPO_TAG

The various env variables would have to be set in the context of the test execution.

We could consider that, if a parameter starts with '$', it is an env variable to be resolved. If no such env variable exists, then the parameter is passed as is to the s2i command.

jfdenise commented 3 years ago

@goldmann @luck3y we have a use-case for it in the context of wildfly/jboss images. If you are ok with the idea, I could contribute the feature. I have a POC of it locally.

luck3y commented 3 years ago

@jfdenise This sounds like a good idea to me, as long as @goldmann doesn't have any objections I think you should do it.

goldmann commented 3 years ago

Wouldn't this make the test not deterministic? If you provide different parameter/env (accidentally or not), then you would end up with results that cannot be really trusted.