Skip to content

Commit 9092cca

Browse files
committed
Fix panic: when start of controlplane fails, the call to Stop
will panic b/c processState was nevery allocated.
1 parent c14d8e6 commit 9092cca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/internal/testing/integration/apiserver.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ func (s *APIServer) setProcessState() error {
125125
// Stop stops this process gracefully, waits for its termination, and cleans up
126126
// the CertDir if necessary.
127127
func (s *APIServer) Stop() error {
128-
return s.processState.Stop()
128+
if s.processState != nil {
129+
return s.processState.Stop()
130+
}
131+
return nil
129132
}
130133

131134
// APIServerDefaultArgs exposes the default args for the APIServer so that you

0 commit comments

Comments
 (0)