Debug: wtf
Some checks failed
Some checks failed
This commit is contained in:
@@ -35,6 +35,7 @@ jobs:
|
|||||||
runs-on: imgbuilder
|
runs-on: imgbuilder
|
||||||
env:
|
env:
|
||||||
COMPOSE_ARGS: '-p go2025-backend'
|
COMPOSE_ARGS: '-p go2025-backend'
|
||||||
|
DOCKER_BUILD_ARGS: '--quiet'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -57,6 +58,8 @@ jobs:
|
|||||||
needs:
|
needs:
|
||||||
- run-go-test
|
- run-go-test
|
||||||
runs-on: imgbuilder
|
runs-on: imgbuilder
|
||||||
|
env:
|
||||||
|
COMPOSE_ARGS: '-p go2025-backend'
|
||||||
steps:
|
steps:
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
uses: https://gitea.konchin.com/action/docker@main
|
uses: https://gitea.konchin.com/action/docker@main
|
||||||
|
|||||||
7
Makefile
7
Makefile
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
SWAG ?= go run github.com/swaggo/swag/cmd/swag@v1.16.4
|
SWAG ?= go run github.com/swaggo/swag/cmd/swag@v1.16.4
|
||||||
DOCKER ?= docker
|
DOCKER ?= docker
|
||||||
|
DOCKER_BUILD_ARGS +=
|
||||||
COMPOSE_ARGS += --progress plain
|
COMPOSE_ARGS += --progress plain
|
||||||
COMPOSE ?= $(DOCKER) compose $(COMPOSE_ARGS)
|
COMPOSE ?= $(DOCKER) compose $(COMPOSE_ARGS)
|
||||||
|
|
||||||
@@ -22,12 +23,14 @@ swagger:
|
|||||||
$(SWAG) init -o docs -g cmds/serve.go -pdl 1
|
$(SWAG) init -o docs -g cmds/serve.go -pdl 1
|
||||||
|
|
||||||
docker-build-native: $(TARGET)
|
docker-build-native: $(TARGET)
|
||||||
$(DOCKER) build . --target native \
|
$(DOCKER) build . $(DOCKER_BUILD_ARGS) \
|
||||||
|
--target native \
|
||||||
-t go2025/backend:native \
|
-t go2025/backend:native \
|
||||||
-t go2025/backend:latest
|
-t go2025/backend:latest
|
||||||
|
|
||||||
docker-build-run:
|
docker-build-run:
|
||||||
$(DOCKER) build . --target build-run \
|
$(DOCKER) build . $(DOCKER_BUILD_ARGS) \
|
||||||
|
--target build-run \
|
||||||
-t go2025/backend:build-run \
|
-t go2025/backend:build-run \
|
||||||
-t go2025/backend:latest
|
-t go2025/backend:latest
|
||||||
|
|
||||||
|
|||||||
@@ -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