diff --git a/pkg/env/env.go b/pkg/env/env.go index b8ff5e98..df5c4523 100644 --- a/pkg/env/env.go +++ b/pkg/env/env.go @@ -363,6 +363,12 @@ func (e *testEnv) Finish(funcs ...Func) types.Environment { return e } +// EnvConf returns the test environment's environment configuration +func (e *testEnv) EnvConf() *envconf.Config { + cfg := *e.cfg + return &cfg +} + // Run is to launch the test suite from a TestMain function. // It will run m.Run() and exercise all test functions in the // package. This method will all Env.Setup operations prior to diff --git a/pkg/types/types.go b/pkg/types/types.go index f0f710c8..f921d86a 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -85,6 +85,9 @@ type Environment interface { // Run Launches the test suite from within a TestMain Run(*testing.M) int + + // EnvConf returns the test environment's environment configuration + EnvConf() *envconf.Config } type Labels = flags.LabelsMap