Skip to content

Commit 4525788

Browse files
authored
Merge pull request #181 from pohly/connection-nil
sanity: avoid nil access for connection
2 parents b59c4c4 + 4d03b5e commit 4525788

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/sanity/sanity.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ func Test(t *testing.T, reqConfig *Config) {
140140
specReporters = append(specReporters, junitReporter)
141141
}
142142
RunSpecsWithDefaultAndCustomReporters(t, "CSI Driver Test Suite", specReporters)
143-
sc.Conn.Close()
143+
if sc.Conn != nil {
144+
sc.Conn.Close()
145+
}
144146
}
145147

146148
func GinkgoTest(reqConfig *Config) {

0 commit comments

Comments
 (0)