Debug: wtf
Some checks failed
Some checks failed
This commit is contained in:
@@ -3,6 +3,7 @@ package tests
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -17,8 +18,7 @@ func Test_03_PutImageAliases(t *testing.T) {
|
||||
}
|
||||
resp, err := client.R().
|
||||
SetBody(payload).
|
||||
Put(fmt.Sprintf("http://localhost:8080/api/image/%d/aliases",
|
||||
image.Id))
|
||||
Put(fmt.Sprintf("/api/image/%d/aliases", image.Id))
|
||||
if err != nil || resp.StatusCode() != http.StatusOK {
|
||||
t.Logf("%+v", resp)
|
||||
t.Fatal("failed to put image alias")
|
||||
@@ -61,6 +61,11 @@ func Test_03_PutImageAliases(t *testing.T) {
|
||||
for _, alias := range aliases {
|
||||
if alias.Name == "testalias2" {
|
||||
t.Logf("%+v", resp)
|
||||
resp, _ = client.R().
|
||||
SetQueryParam("aliases",
|
||||
strconv.FormatInt(alias.Id, 10)).
|
||||
Get("/api/images")
|
||||
t.Logf("%+v", resp)
|
||||
t.Fatal("alias should be deleted")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user