1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00
goreleaser/internal/testlib
Eng Zer Jun 73e59160de
test: use t.Setenv to set env vars (#4140)
We have been using `t.Setenv` is most of our tests. This PR replaces the
remaining `os.Setenv` with `t.Setenv`.

Reference: https://pkg.go.dev/testing#T.Setenv

```go
func TestFoo(t *testing.T) {
	// before
	os.Setenv(key, "new value")
	defer os.Unsetenv(key)
	
	// after
	t.Setenv(key, "new value")
}
```

---------

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-06-25 09:54:10 -03:00
..
archive.go test: ensure utf-8 sources/archives filenames work properly (#3925) 2023-04-15 15:48:14 -03:00
docker.go feat: add ko support (#3653) 2023-01-16 22:34:49 -03:00
git_test.go docs: schema update 2022-08-27 17:38:23 -03:00
git.go refactor: use context 2023-04-30 13:33:57 +00:00
log.go fix(ci): less logs in the test output (#3207) 2022-06-27 00:13:08 -03:00
mktemp_test.go refactor(test): use testing.TB Cleanup and Tempdir (#1945) 2020-12-12 13:27:35 -03:00
mktemp.go feat(ci): run lint on actions (#2087) 2021-03-01 14:45:06 -03:00
path_test.go test: use t.Setenv to set env vars (#4140) 2023-06-25 09:54:10 -03:00
path.go test: allow to locally skip some tests on missing tools (#2594) 2021-10-20 21:56:27 -03:00
skip_test.go
skip.go chore(deps): bump github.com/golangci/golangci-lint from 1.33.0 to 1.34.1 (#1975) 2020-12-29 15:40:21 +00:00
tmpl.go style: spelling and grammar fixes (#4069) 2023-06-05 13:08:57 -03:00