progrium / entrykit

Entrypoint tools for elegant, programmable containers
443 stars 29 forks source link

Fix sigil posix env handling #2

Open lalyos opened 8 years ago

joemcmahon commented 4 years ago

@lalyos, would you mind reworking this to fit with the go dep-based dependency management? We'd like to eliminate the requirement for more CLI programs being imported -- if these could be pure Go tests it would be really nice. We're not averse to adding Ginkgo if that would help you write the tests more easily. Please let us know if you'd like a hand.

lalyos commented 4 years ago

@joemcmahon I could fix this PR to use go dep.

But regarding your other request about "pure Go tests": those test are not unit tests, but rather integration.

I wanted to have a test if somebody start using entrykit by creating a new Dockerfile like:

FROM entrykit
ENTRYPOINT ["/bin/switch","cmd1=echo app foo is running","cmd2=echo app bar is running","--"]

and then using this image, if somebody starts a new container:

docker run --rm <img-dockerfile-above> cmd1

it produces the right output.

Thats why those test are coded in bash, and without using basht there would be more glue code in bash.