Don't ignore errors

This commit is contained in:
Till Faelligen 2022-12-01 15:15:14 +01:00
parent 85155f52b3
commit 3121a9f17b
No known key found for this signature in database
GPG key ID: ACCDC9606D472758

View file

@ -493,8 +493,10 @@ func testCreateAccount(dockerClient *client.Client, v string, containerID string
}
defer response.Close()
data, _ := ioutil.ReadAll(response.Reader)
fmt.Println(string(data))
data, err := ioutil.ReadAll(response.Reader)
if err != nil {
return err
}
if !bytes.Contains(data, []byte("AccessToken")) {
return fmt.Errorf("failed to create-account: %s", string(data))