Skip to content

Commit 2f78a40

Browse files
authored
fix(tests): refactor env handling - sqlserver cert (#3823)
Signed-off-by: Mike Nguyen <hey@mike.ee>
1 parent 88fce6a commit 2f78a40

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/certification/state/sqlserver/sqlserver_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ func TestSqlServer(t *testing.T) {
6666
// This environment variable is used to revert to the old behavior.
6767
// Ref: https://github.com/microsoft/mssql-docker/issues/895
6868
oldDebugValue := os.Getenv("GODEBUG")
69-
err := t.Setenv("GODEBUG", "x509negativeserial=1")
70-
if err != nil {
71-
t.Fatalf("Failed to set GODEBUG environment variable: %v", err)
69+
t.Setenv("GODEBUG", "x509negativeserial=1")
70+
71+
if os.Getenv("GODEBUG") != "x509negativeserial=1" {
72+
t.Fatal("Failed to set GODEBUG environment variable, actual value: " + os.Getenv("GODEBUG"))
7273
}
7374
defer func() {
7475
t.Setenv("GODEBUG", oldDebugValue)

0 commit comments

Comments
 (0)