open-consul/agent/connect/ca
Daniel Nephin bb7f2f15b3 ca: require that tests that use Vault are named correctly
Previously we were using two different criteria to decide where to run a
test.  The main `go-test` job would skip Vault tests based on the
presence of the `vault` binary, but the `test-connect-ca-providers` job
would run tests based on the name.

This led to a scenario where a test may never run in CI.

To fix this problem I added a name check to the function we use to skip
the test. This should ensure that any test that requires vault is named
correctly to be run as part of the `test-connect-ca-providers` job.

At the same time I relaxed the regex we use. I verified this runs the
same tests using `go test --list Vault`.  I made this change because a
bunch of tests in `agent/connect/ca` used `Vault` in the name, without
the underscores. Instead of changing a bunch of test names, this seemed
easier.

With this approach, the worst case is that we run a few extra tests in
the `test-connect-ca-providers` job, which doesn't seem like a problem.
2022-02-28 16:13:53 -05:00
..
common.go ca: cleanup validateSetIntermediate 2022-02-17 18:21:30 -05:00
mock_Provider.go ca: update MockProvider for new interface 2022-01-27 12:51:35 -05:00
provider.go Update TODOs to reference an issue with more details 2022-02-17 18:21:30 -05:00
provider_aws.go ca/provider: remove ActiveRoot from Provider 2022-01-27 13:07:37 -05:00
provider_aws_test.go ca/provider: remove ActiveRoot from Provider 2022-01-27 13:07:37 -05:00
provider_consul.go ca: cleanup validateSetIntermediate 2022-02-17 18:21:30 -05:00
provider_consul_config.go add root_cert_ttl option for consul connect, vault ca providers (#11428) 2021-11-02 11:02:10 -07:00
provider_consul_test.go ca/provider: remove ActiveRoot from Provider 2022-01-27 13:07:37 -05:00
provider_test.go Vendor in rpc mono repo for net/rpc fork, go-msgpack, msgpackrpc. (#12311) 2022-02-14 09:45:45 -08:00
provider_vault.go Update TODOs to reference an issue with more details 2022-02-17 18:21:30 -05:00
provider_vault_test.go ca/provider: remove ActiveRoot from Provider 2022-01-27 13:07:37 -05:00
testing.go ca: require that tests that use Vault are named correctly 2022-02-28 16:13:53 -05:00