diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 7cc8461..d48db80 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -35,6 +35,7 @@ jobs: runs-on: imgbuilder env: COMPOSE_ARGS: '-p go2025-backend' + DOCKER_BUILD_ARGS: '--quiet' steps: - name: Checkout repository uses: actions/checkout@v4 @@ -57,6 +58,8 @@ jobs: needs: - run-go-test runs-on: imgbuilder + env: + COMPOSE_ARGS: '-p go2025-backend' steps: - name: Build and push image uses: https://gitea.konchin.com/action/docker@main diff --git a/Makefile b/Makefile index 98df887..0bc8520 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ SWAG ?= go run github.com/swaggo/swag/cmd/swag@v1.16.4 DOCKER ?= docker +DOCKER_BUILD_ARGS += COMPOSE_ARGS += --progress plain COMPOSE ?= $(DOCKER) compose $(COMPOSE_ARGS) @@ -22,12 +23,14 @@ swagger: $(SWAG) init -o docs -g cmds/serve.go -pdl 1 docker-build-native: $(TARGET) - $(DOCKER) build . --target native \ + $(DOCKER) build . $(DOCKER_BUILD_ARGS) \ + --target native \ -t go2025/backend:native \ -t go2025/backend:latest docker-build-run: - $(DOCKER) build . --target build-run \ + $(DOCKER) build . $(DOCKER_BUILD_ARGS) \ + --target build-run \ -t go2025/backend:build-run \ -t go2025/backend:latest diff --git a/tests/03_putImageAliases_test.go b/tests/03_putImageAliases_test.go index d349a12..bcf00b5 100644 --- a/tests/03_putImageAliases_test.go +++ b/tests/03_putImageAliases_test.go @@ -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") } }