Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/server/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions apps/server/internal/modules/auth/service_test.go
Original file line number Diff line number Diff line change
@@ -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)
}
}
Loading