optiopay / klar

Integration of Clair and Docker Registry
MIT License
507 stars 140 forks source link

Introduce integration tests #44

Open hashmap opened 7 years ago

hashmap commented 7 years ago

This is important part of the test suite, unfortunately, I'm not sure how to make it opensource. My current test is a shell script:

source my-klar-env
./klar mysql
./klar postgres:9.6
./klar postgres@sha256:1364924c753d5ff7e2260cd34dc4ba05ebd40ee8193391220be0f9901d4e1651
./klar skynetservices/skydns
./klar skynetservices/skydns:2.5.3a
./klar some.private.registry/user/image
./klar some.private.registry/user/image:tag

The problem is in my-klar-env which contains docker registry creds. It could be a local file which each developer must customize. However it would be nice to make it a part of Travis CI build, so user account must be exposed.

We need it to run tests twice with different env files - with and without docker creds, scanning only public images in the second case.

wurstbrot commented 7 years ago

Do you also want to test the parameter REGISTRY_INSECURE with some.private.registry/user/image?