Skip to content

Commit f616f9a

Browse files
committed
test: trigger CI test
Signed-off-by: Ardika Bagus <[email protected]>
1 parent 9ef7bc6 commit f616f9a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
File renamed without changes.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# go-stdlib
22

3-
[![Test](https://github.com/ardikabs/go-stdlib/actions/workflows/test.yaml/badge.svg?branch=master)](https://github.com/ardikabs/go-stdlib/actions/workflows/test.yaml)
43
[![Go Reference](https://pkg.go.dev/badge/github.com/ardikabs/go-stdlib.svg)](https://pkg.go.dev/github.com/ardikabs/go-stdlib)
54
[![Go Report Card](https://goreportcard.com/badge/github.com/ardikabs/go-stdlib)](https://goreportcard.com/report/github.com/ardikabs/go-stdlib)
5+
[![Test](https://github.com/ardikabs/go-stdlib/actions/workflows/test.yaml/badge.svg?branch=master)](https://github.com/ardikabs/go-stdlib/actions/workflows/test.yaml)
66
![Go Version](https://img.shields.io/badge/go%20version-%3E=1.20-61CFDD.svg?style=flat-square)
77
[![codecov](https://codecov.io/gh/ardikabs/golib/branch/master/graph/badge.svg)](https://codecov.io/gh/ardikabs/golib)
88

pkg/env/env_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import (
1010
)
1111

1212
func TestLookup(t *testing.T) {
13+
defer os.Clearenv()
1314
t.Setenv("HTTP_ADDR", "0.0.0.0")
1415
t.Setenv("HTTP_PORT", "8080")
1516
t.Setenv("DEBUG_MODE", "1")
1617
t.Setenv("HTTP_TIMEOUT", "30s")
1718
t.Setenv("HTTP_RESERVED_CONTENT_TYPES", "text/plain,application/json")
1819
t.Setenv("HTTP_RESERVED_STATUS_CODES", "401,429,503")
19-
defer os.Clearenv()
2020

2121
gotString := env.Lookup("HTTP_ADDR", "127.0.0.1")
2222
require.Equal(t, "0.0.0.0", gotString)
@@ -38,14 +38,14 @@ func TestLookup(t *testing.T) {
3838
}
3939

4040
func TestLookupDefaultValue(t *testing.T) {
41+
defer os.Clearenv()
4142
t.Setenv("HTTP_ADDR", "")
4243
t.Setenv("HTTP_PORT", "invalid-value")
4344
t.Setenv("DEBUG_MODE", "invalid-value")
4445
t.Setenv("HTTP_TIMEOUT", "invalid-value")
4546
t.Setenv("HTTP_RESERVED_CONTENT_TYPES", "")
4647
t.Setenv("HTTP_RESERVED_STATUS_CODES", "")
4748
t.Setenv("RANGE_OF_RETRY_BACKOFF_SECONDS", "10,20,30a")
48-
defer os.Clearenv()
4949

5050
got := env.Lookup("AGENT_MODE", true)
5151
require.Equal(t, true, got)

0 commit comments

Comments
 (0)