From bae8dbdbe6f0343625bd7cf4cfab3349615f3667 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 22:39:38 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20[docker]=20Fix=20go=20build=20to?= =?UTF-8?q?olchain=20error=20by=20running=20go=20mod=20tidy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/server/dockerfile | 1 + .../internal/modules/auth/service_test.go | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 apps/server/internal/modules/auth/service_test.go diff --git a/apps/server/dockerfile b/apps/server/dockerfile index f801846..aab7a1e 100644 --- a/apps/server/dockerfile +++ b/apps/server/dockerfile @@ -20,6 +20,7 @@ RUN go mod download COPY . . # Build the application +RUN go mod tidy RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main ./cmd/main.go # Stage 2: Runtime stage diff --git a/apps/server/internal/modules/auth/service_test.go b/apps/server/internal/modules/auth/service_test.go new file mode 100644 index 0000000..762a9e9 --- /dev/null +++ b/apps/server/internal/modules/auth/service_test.go @@ -0,0 +1,27 @@ +package auth + +import ( + "testing" + + "github.com/coderz-space/coderz.space/internal/config" + db "github.com/coderz-space/coderz.space/internal/db/sqlc" +) + +func TestNewService(t *testing.T) { + queries := &db.Queries{} + cfg := &config.Config{} + + service := NewService(queries, cfg) + + if service == nil { + t.Fatal("Expected NewService to return a non-nil Service instance") + } + + if service.queries != queries { + t.Errorf("Expected queries to be %p, got %p", queries, service.queries) + } + + if service.config != cfg { + t.Errorf("Expected config to be %p, got %p", cfg, service.config) + } +}