[PR #198] Add a basic functional test for mkcert, for #136 #415

Open
opened 2026-02-25 22:33:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/FiloSottile/mkcert/pull/198
Author: @rfay
Created: 9/15/2019
Status: 🔄 Open

Base: masterHead: 20190915_tests


📝 Commits (6)

  • 6d1a1eb Add basic functionality test for mkcert
  • b995f43 Misc module/vendor changes for testing
  • da45238 Add TestMain that builds mkcert
  • 7ffce03 Call context cancel func to pacify go vet
  • 66f6e03 Re-add test into travis.yml
  • 96c3403 Pull out staticcheck line since it's not in container yet

📊 Changes

53 files changed (+19393 additions, -1 deletions)

View changed files

📝 .travis.yml (+2 -1)
📝 go.mod (+1 -0)
📝 go.sum (+9 -0)
main_test.go (+85 -0)
vendor/github.com/davecgh/go-spew/LICENSE (+15 -0)
vendor/github.com/davecgh/go-spew/spew/bypass.go (+152 -0)
vendor/github.com/davecgh/go-spew/spew/bypasssafe.go (+38 -0)
vendor/github.com/davecgh/go-spew/spew/common.go (+341 -0)
vendor/github.com/davecgh/go-spew/spew/config.go (+306 -0)
vendor/github.com/davecgh/go-spew/spew/doc.go (+211 -0)
vendor/github.com/davecgh/go-spew/spew/dump.go (+509 -0)
vendor/github.com/davecgh/go-spew/spew/format.go (+419 -0)
vendor/github.com/davecgh/go-spew/spew/spew.go (+148 -0)
vendor/github.com/pmezard/go-difflib/LICENSE (+27 -0)
vendor/github.com/pmezard/go-difflib/difflib/difflib.go (+772 -0)
vendor/github.com/stretchr/testify/LICENSE (+21 -0)
vendor/github.com/stretchr/testify/assert/assertion_format.go (+566 -0)
vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl (+5 -0)
vendor/github.com/stretchr/testify/assert/assertion_forward.go (+1120 -0)
vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl (+5 -0)

...and 33 more files

📄 Description

#136 points out that mkcert is completely lacking tests.

This PR does a very basic functional test building, testing, and using the mkcert binary

  • Build mkcert for current OS
  • mkcert -install
  • mkcert localhost to get a cert/key
  • Run a server
  • Hit the server and look for errors

The go test -v is added to the .travis.yml and passes on the single current linux environment (Ubuntu 16.04 with sudo enabled).

A next step would be a matrix including Travis's other available Ubuntu versions, macOS, and WIndows if we can get past the confirmation step in mkcert -install.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/FiloSottile/mkcert/pull/198 **Author:** [@rfay](https://github.com/rfay) **Created:** 9/15/2019 **Status:** 🔄 Open **Base:** `master` ← **Head:** `20190915_tests` --- ### 📝 Commits (6) - [`6d1a1eb`](https://github.com/FiloSottile/mkcert/commit/6d1a1ebf7b924cdb3c8c7f5818c43636e63396fe) Add basic functionality test for mkcert - [`b995f43`](https://github.com/FiloSottile/mkcert/commit/b995f439b1afb3550536924d5dd0eecbf9af7a9b) Misc module/vendor changes for testing - [`da45238`](https://github.com/FiloSottile/mkcert/commit/da45238a1e518ba4b9510f67f5fc0d4b9e83c9a9) Add TestMain that builds mkcert - [`7ffce03`](https://github.com/FiloSottile/mkcert/commit/7ffce03a672493081a41393111d4dcb6ade87cbb) Call context cancel func to pacify go vet - [`66f6e03`](https://github.com/FiloSottile/mkcert/commit/66f6e032c31cecf32c11e9102c0892e53f9e31a7) Re-add test into travis.yml - [`96c3403`](https://github.com/FiloSottile/mkcert/commit/96c340398a41f542117d7d955a6787a9688c8cb2) Pull out staticcheck line since it's not in container yet ### 📊 Changes **53 files changed** (+19393 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.travis.yml` (+2 -1) 📝 `go.mod` (+1 -0) 📝 `go.sum` (+9 -0) ➕ `main_test.go` (+85 -0) ➕ `vendor/github.com/davecgh/go-spew/LICENSE` (+15 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/bypass.go` (+152 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/bypasssafe.go` (+38 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/common.go` (+341 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/config.go` (+306 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/doc.go` (+211 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/dump.go` (+509 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/format.go` (+419 -0) ➕ `vendor/github.com/davecgh/go-spew/spew/spew.go` (+148 -0) ➕ `vendor/github.com/pmezard/go-difflib/LICENSE` (+27 -0) ➕ `vendor/github.com/pmezard/go-difflib/difflib/difflib.go` (+772 -0) ➕ `vendor/github.com/stretchr/testify/LICENSE` (+21 -0) ➕ `vendor/github.com/stretchr/testify/assert/assertion_format.go` (+566 -0) ➕ `vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl` (+5 -0) ➕ `vendor/github.com/stretchr/testify/assert/assertion_forward.go` (+1120 -0) ➕ `vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl` (+5 -0) _...and 33 more files_ </details> ### 📄 Description #136 points out that mkcert is completely lacking tests. This PR does a very basic functional test building, testing, and using the mkcert binary * Build mkcert for current OS * `mkcert -install` * `mkcert localhost` to get a cert/key * Run a server * Hit the server and look for errors The `go test -v` is added to the .travis.yml and passes on the single current linux environment (Ubuntu 16.04 with sudo enabled). A next step would be a matrix including Travis's other available Ubuntu versions, macOS, and WIndows if we can get past the confirmation step in `mkcert -install`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#415
No description provided.