FiloSottile / mkcert

A simple zero-config tool to make locally trusted development certificates with any names you'd like.
https://mkcert.dev
BSD 3-Clause "New" or "Revised" License
48.79k stars 2.52k forks source link

mkcert has no tests #136

Open crawshaw opened 5 years ago

crawshaw commented 5 years ago
$ go test ./...
?       github.com/FiloSottile/mkcert   [no test files]
FiloSottile commented 5 years ago

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.

adamdecaf commented 5 years ago

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

rfay commented 5 years ago

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.

adamdecaf commented 5 years ago

TravisCI has free macOS and windows builders we can use.

rfay commented 5 years ago

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

FiloSottile commented 5 years ago

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.