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
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-07-06 09:52:46 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-07-07 07:50:27 +0300
commit08b2d318b9ce3904bf6c8432edfcedaf352f123e (patch)
treedea2b15aeac7d38638815e5a6535af55a672f292 /.golangci.yml
parent9deccce765e2437e87563378f878b8604fc73a9a (diff)
testhelper: Add new `Unsetenv()` helper
With Go 1.17 a new `t.Setenv()` helper was introduced that automatically restores the previous environment variable and that verifies that the current test is not labelled as parallel. We're about to migrate all callers to use it instead of `testhelper.ModifyEnvironment()`. One part that `testhelper.ModifyEnvironment()` does though is to unset an environment variable in case the given value is the empty string. And unfortunately, Go didn't introduce a `t.Unsetenv()` helper at the same time. Implement a new function `testhelper.Unsetenv()` that behaves the same as `t.Setenv()`, except that it unsets the environment variable.
Diffstat (limited to '.golangci.yml')
0 files changed, 0 insertions, 0 deletions