Fix: image alias put query
All checks were successful
Go test / run-go-vet (push) Successful in 5s
Go test / check-swagger-up-to-date (push) Successful in 8s
Go test / run-go-test (push) Successful in 27s
Go test / cleanup-go-test (push) Successful in 4s
Go test / release-image (push) Successful in 3m34s

This commit is contained in:
2025-12-13 00:56:06 +08:00
parent 44a3bf64c1
commit 968c0c5658
3 changed files with 57 additions and 14 deletions

View File

@@ -7,9 +7,11 @@ import (
)
func Test_07_DeleteAlias(t *testing.T) {
deleteId := aliases[0].Id
resp, err := client.R().
Delete(fmt.Sprintf("http://localhost:8080/api/alias/%d",
aliases[0].Id))
deleteId))
if err != nil || resp.StatusCode() != http.StatusOK {
t.Logf("%+v", resp)
t.Fatal("failed to delete alias")
@@ -23,7 +25,10 @@ func Test_07_DeleteAlias(t *testing.T) {
t.Fatal("failed to get aliases")
}
if len(aliases) > 0 {
t.Fatal("alias not deleted")
for _, alias := range aliases {
if alias.Id == deleteId {
t.Logf("%+v", resp)
t.Fatal("alias not deleted")
}
}
}