mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Return errors, fix linter
This commit is contained in:
parent
ba37b1993b
commit
d0cc7615ef
|
|
@ -476,12 +476,15 @@ func loadAndRunTests(dockerClient *client.Client, volumeName, v string, branchTo
|
||||||
"-password", "someRandomPassword",
|
"-password", "someRandomPassword",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to ContainerExecCreate: %w", err)
|
||||||
|
}
|
||||||
resp, err := InspectExecResp(context.Background(), dockerClient, respID.ID)
|
resp, err := InspectExecResp(context.Background(), dockerClient, respID.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("failed to inspect exec: %s", err)
|
return fmt.Errorf("failed to InspectExecResp: %w", err)
|
||||||
}
|
}
|
||||||
if !strings.Contains(resp.StdErr, "AccessToken") || resp.ExitCode != 0 {
|
if !strings.Contains(resp.StdErr, "AccessToken") || resp.ExitCode != 0 {
|
||||||
log.Fatalf("Failed to create-account: %s", resp.StdErr)
|
return fmt.Errorf("failed to create-account (exit code %d): %s", resp.ExitCode, resp.StdErr)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue