Skip to content

Commit 4d03b5e

Browse files
committed
sanity: avoid nil access for connection
The assumption that sc.conn always gets set turned out to be false. The reason probably was running with such a high number of Ginkgo nodes that some nodes never had to execute any test.
1 parent ca4c526 commit 4d03b5e

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
@@ -139,7 +139,9 @@ func Test(t *testing.T, reqConfig *Config) {
139139
specReporters = append(specReporters, junitReporter)
140140
}
141141
RunSpecsWithDefaultAndCustomReporters(t, "CSI Driver Test Suite", specReporters)
142-
sc.Conn.Close()
142+
if sc.Conn != nil {
143+
sc.Conn.Close()
144+
}
143145
}
144146

145147
func GinkgoTest(reqConfig *Config) {

0 commit comments

Comments
 (0)