From a12d699a2e7fded8f40e08bee0d13a3c8690a861 Mon Sep 17 00:00:00 2001 From: Onsi Fakhouri Date: Thu, 9 Sep 2021 08:59:16 -0600 Subject: [PATCH] Add no-op Setenv to GinkgoT --- ginkgo_dsl.go | 1 + internal/testingtproxy/testing_t_proxy.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ginkgo_dsl.go b/ginkgo_dsl.go index 4a6e1e1ee..dccc2952e 100644 --- a/ginkgo_dsl.go +++ b/ginkgo_dsl.go @@ -109,6 +109,7 @@ func GinkgoT(optionalOffset ...int) GinkgoTInterface { //in the testing package's T. type GinkgoTInterface interface { Cleanup(func()) + Setenv(key, value string) Error(args ...interface{}) Errorf(format string, args ...interface{}) Fail() diff --git a/internal/testingtproxy/testing_t_proxy.go b/internal/testingtproxy/testing_t_proxy.go index d7bbb7a96..4dcfaf4cd 100644 --- a/internal/testingtproxy/testing_t_proxy.go +++ b/internal/testingtproxy/testing_t_proxy.go @@ -34,6 +34,11 @@ func (t *ginkgoTestingTProxy) Cleanup(func()) { // No-op } +func (t *ginkgoTestingTProxy) Setenv(kev, value string) { + fmt.Println("Setenv is a noop for Ginkgo at the moment but will be implemented in V2") + // No-op until Cleanup is implemented +} + func (t *ginkgoTestingTProxy) Error(args ...interface{}) { t.fail(fmt.Sprintln(args...), t.offset) }