harbor/src/chartserver
Eng Zer Jun cd0fa06a32
test: use T.Setenv to set env vars in tests (#17670)
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>

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-10-25 10:56:26 +08:00
..
base_test.go Add more UT cases for changed chart API 2018-09-20 17:51:27 +08:00
cache_test.go Fix Chart V2 Can't parse 2020-07-21 10:07:08 +08:00
cache.go lint: sort imports (#17131) 2022-07-20 11:33:08 +08:00
chart_operator_test.go Add more UT cases for changed chart API 2018-09-20 17:51:27 +08:00
chart_operator.go lint: sort imports (#17131) 2022-07-20 11:33:08 +08:00
client.go Refactor and Add trace to http Transport 2021-09-18 10:58:52 +00:00
controller_test.go Refactor the chart service implementation to provide more extemding flexibilities 2018-09-19 16:34:58 +08:00
controller.go move logger from common to lib 2020-04-02 14:09:03 +08:00
handler_interface.go Fix Chart V2 Can't parse 2020-07-21 10:07:08 +08:00
handler_manipulation_test.go Fix Chart V2 Can't parse 2020-07-21 10:07:08 +08:00
handler_manipulation.go lint: sort imports (#17131) 2022-07-20 11:33:08 +08:00
handler_proxy_traffic_test.go lint: sort imports (#17131) 2022-07-20 11:33:08 +08:00
handler_proxy_traffic.go Refactor the chart service implementation to provide more extemding flexibilities 2018-09-19 16:34:58 +08:00
handler_repo_test.go Refactor the chart service implementation to provide more extemding flexibilities 2018-09-19 16:34:58 +08:00
handler_repo.go fix: update code for golangci-lint gosimple (#16974) 2022-06-14 13:44:09 +08:00
handler_utility_test.go Fix Chart V2 Can't parse 2020-07-21 10:07:08 +08:00
handler_utility.go lint: sort imports (#17131) 2022-07-20 11:33:08 +08:00
redis_sentinel.go lint: sort imports (#17131) 2022-07-20 11:33:08 +08:00
reverse_proxy_test.go Rever chart version to original 2020-04-01 11:55:22 +08:00
reverse_proxy.go fix deadcode lint & update golangci-lint.yaml (#16896) 2022-05-26 10:32:07 +08:00
utils_test.go test: use T.Setenv to set env vars in tests (#17670) 2022-10-25 10:56:26 +08:00
utils.go fix: update code for golangci-lint gosimple (#16974) 2022-06-14 13:44:09 +08:00