Merge pull request #5823 from AdamKorcz/fuzz6

Fuzzing: Remove panics of container_fuzzer
This commit is contained in:
Phil Estes 2021-08-02 10:39:34 -04:00 committed by GitHub
commit 58dbe9685e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,10 +70,7 @@ func tearDown() error {
// working socket. // working socket.
func checkIfShouldRestart(err error) { func checkIfShouldRestart(err error) {
if strings.Contains(err.Error(), "daemon is not running") { if strings.Contains(err.Error(), "daemon is not running") {
err2 := deleteSocket() deleteSocket()
if err2 != nil {
panic(err2)
}
} }
} }
@ -104,7 +101,6 @@ func startDaemon(ctx context.Context, shouldTearDown bool) {
// so we panic // so we panic
if !strings.Contains(err.Error(), "daemon is already running") { if !strings.Contains(err.Error(), "daemon is already running") {
fmt.Fprintf(os.Stderr, "%s: %s\n", err, buf.String()) fmt.Fprintf(os.Stderr, "%s: %s\n", err, buf.String())
panic(err)
} }
} }
if shouldTearDown { if shouldTearDown {