Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2022-01-17 15:58:16 +0300
committerToon Claes <toon@gitlab.com>2022-01-17 15:58:16 +0300
commitcf4cff104abd2b41f2fc04d69aba8b00cfbdb650 (patch)
tree9c0e9cfecb04e85a2f43ee58ef5fbc03c8e57cd1 /client
parent7ce0d18ad44686865aa0dbf5f1b47d9cc05988be (diff)
testhelper: ModifyEnvironment cleans after itself
Prior to this change, ModifyEnvironment was returning a function to revert the changes done. This was typically passed to defer or to t.Cleanup(). This change moves calling t.Cleanup() to the ModifyEnvironment function itself.
Diffstat (limited to 'client')
-rw-r--r--client/dial_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/dial_test.go b/client/dial_test.go
index 0652fffbe..9a0f9f660 100644
--- a/client/dial_test.go
+++ b/client/dial_test.go
@@ -128,7 +128,7 @@ func TestDial(t *testing.T) {
}
if tt.envSSLCertFile != "" {
- defer testhelper.ModifyEnvironment(t, gitalyx509.SSLCertFile, tt.envSSLCertFile)()
+ testhelper.ModifyEnvironment(t, gitalyx509.SSLCertFile, tt.envSSLCertFile)
}
ctx, cancel := testhelper.Context()
@@ -218,7 +218,7 @@ func TestDialSidechannel(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if tt.envSSLCertFile != "" {
- defer testhelper.ModifyEnvironment(t, gitalyx509.SSLCertFile, tt.envSSLCertFile)()
+ testhelper.ModifyEnvironment(t, gitalyx509.SSLCertFile, tt.envSSLCertFile)
}
ctx, cancel := testhelper.Context()