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