mkcert icon indicating copy to clipboard operation
mkcert copied to clipboard

mkcert has no tests

Open crawshaw opened this issue 7 years ago • 6 comments

$ go test ./...
?   	github.com/FiloSottile/mkcert	[no test files]

crawshaw avatar Feb 15 '19 17:02 crawshaw

Ahem, I might not have initially expected this to become so popular.

Now, tests would have to be integration tests to be meaningful, and that's going to be a pain, in particular on Windows and macOS.

Still, I should do the work. Just whining.

FiloSottile avatar Feb 15 '19 20:02 FiloSottile

I've done some work around integration tests and certificate stores, it's not fun, but I'd pitch in also. It works okay to spin up docker containers so the host doesn't get trashed on a bad test run.

Old project: https://github.com/adamdecaf/certaudit/tree/master/test

adamdecaf avatar Feb 15 '19 21:02 adamdecaf

This is super important. It is hard to do tests for all platforms, but as important as this project is, it's really something to be done. Linux is easy of course. macOS is a little harder but CircleCI has macOS instances, unfortunately not free. Appveyor has free (I think) testing for small windows tests like this. Our company runs testbots for windows and macOS via buildkite, so that also might be a path. The sad thing is that the Windows testbots are so terribly unpredictable and have to be restarted too often. This is a pretty simple set of tests though so might work out just fine.

rfay avatar Aug 20 '19 22:08 rfay

TravisCI has free macOS and windows builders we can use.

adamdecaf avatar Aug 20 '19 22:08 adamdecaf

Now we just need some people to make the tests :)

rfay avatar Aug 20 '19 23:08 rfay

Linux is not trivial, if we want meaningful tests. We need to run in a number of environments, which means we'll probably need some sort of runner/testlet system, and a bunch of Dockerfiles.

I have an idea for the architecture, I was planning to put it together this month.

FiloSottile avatar Aug 21 '19 00:08 FiloSottile