ContainerImage.Pinniped/test/integration
Matt Moyer 434e3fe435
Refactor integration test environment helpers to be more structured.
This change replaces our previous test helpers for checking cluster capabilities and passing external test parameters. Prior to this change, we always used `$PINNIPED_*` environment variables and these variables were accessed throughout the test code.

The new code introduces a more strongly-typed `TestEnv` structure and helpers which load and expose the parameters. Tests can now call `env := library.IntegrationEnv(t)`, then access parameters such as `env.Namespace` or `env.TestUser.Token`. This should make this data dependency easier to manage and refactor in the future. In many ways this is just an extended version of the previous cluster capabilities YAML.

Tests can also check for cluster capabilities easily by using `env := library.IntegrationEnv(t).WithCapability(xyz)`.

The actual parameters are still loaded from OS environment variables by default (for compatibility), but the code now also tries to load the data from a Kubernetes Secret (`integration/pinniped-test-env` by default). I'm hoping this will be a more convenient way to pass data between various scripts than the local `/tmp` directory. I hope to remove the OS environment code in a future commit.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2020-09-24 18:03:45 -05:00
..
api_discovery_test.go Remove deprecated "pinniped.dev" API group. 2020-09-18 17:32:15 -05:00
api_serving_certs_test.go Refactor integration test environment helpers to be more structured. 2020-09-24 18:03:45 -05:00
app_availability_test.go Refactor integration test environment helpers to be more structured. 2020-09-24 18:03:45 -05:00
cli_test.go Refactor integration test environment helpers to be more structured. 2020-09-24 18:03:45 -05:00
client_test.go Refactor integration test environment helpers to be more structured. 2020-09-24 18:03:45 -05:00
common_test.go test/integration: declare some test helpers to fix line reporting 2020-09-24 13:53:45 -04:00
credentialissuerconfig_test.go Refactor integration test environment helpers to be more structured. 2020-09-24 18:03:45 -05:00
credentialrequest_test.go Refactor integration test environment helpers to be more structured. 2020-09-24 18:03:45 -05:00
kubecertagent_test.go Refactor integration test environment helpers to be more structured. 2020-09-24 18:03:45 -05:00
kubectl_test.go Add Go vanity import paths. 2020-09-18 14:56:24 -05:00