Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use T.Setenv to set env vars in tests #5398

Merged
merged 1 commit into from
Sep 3, 2022
Merged

test: use T.Setenv to set env vars in tests #5398

merged 1 commit into from
Sep 3, 2022

Commits on Aug 31, 2022

  1. test: use T.Setenv to set env vars in tests

    This commit replaces `os.Setenv` with `t.Setenv` in tests. The
    environment variable is automatically restored to its original value
    when the test and all its subtests complete.
    
    Reference: https://pkg.go.dev/testing#T.Setenv
    Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
    Juneezee committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    23a881d View commit details
    Browse the repository at this point in the history