fix: replace GO_TESTING with DAV_SKIP_INIT for DAV service initialization
CI / Env docs check (push) Failing after 17s
CI / Docker compose check (push) Successful in 1m29s
CI / Secrets scan (push) Successful in 1m33s
CI / Frontend major deps (push) Successful in 1m31s
CI / Go build (push) Successful in 1m33s
CI / Frontend deps check (push) Successful in 1m33s
CI / Frontend build (push) Successful in 1m32s
CI / Nginx config check (push) Successful in 1m33s
CI / go mod tidy (push) Successful in 1m18s
CI / Go vulnerabilities (push) Failing after 0s
CI / Knip (push) Failing after 0s
CI / Frontend a11y check (push) Failing after 0s
CI / Svelte strict check (push) Has been skipped
CI / Frontend QC (audit) (push) Has been skipped
CI / Frontend QC (typecheck) (push) Has been skipped
CI / Frontend QC (lint) (push) Has been skipped
CI / Go vet (prod) (push) Successful in 1m31s
CI / Go vet (dev) (push) Successful in 1m51s
CI / Staticcheck (prod) (push) Successful in 2m27s
CI / Staticcheck (dev) (push) Successful in 2m55s
CI / golangci-lint (push) Successful in 3m13s
CI / Security scan (prod) (push) Successful in 4m8s
CI / Security scan (dev) (push) Successful in 4m15s
CI / Tests (prod) (push) Has been skipped
CI / Tests (dev) (push) Has been skipped
CI / Race (prod) (push) Has been skipped
CI / Race (dev) (push) Has been skipped
CI / Env docs check (push) Failing after 17s
CI / Docker compose check (push) Successful in 1m29s
CI / Secrets scan (push) Successful in 1m33s
CI / Frontend major deps (push) Successful in 1m31s
CI / Go build (push) Successful in 1m33s
CI / Frontend deps check (push) Successful in 1m33s
CI / Frontend build (push) Successful in 1m32s
CI / Nginx config check (push) Successful in 1m33s
CI / go mod tidy (push) Successful in 1m18s
CI / Go vulnerabilities (push) Failing after 0s
CI / Knip (push) Failing after 0s
CI / Frontend a11y check (push) Failing after 0s
CI / Svelte strict check (push) Has been skipped
CI / Frontend QC (audit) (push) Has been skipped
CI / Frontend QC (typecheck) (push) Has been skipped
CI / Frontend QC (lint) (push) Has been skipped
CI / Go vet (prod) (push) Successful in 1m31s
CI / Go vet (dev) (push) Successful in 1m51s
CI / Staticcheck (prod) (push) Successful in 2m27s
CI / Staticcheck (dev) (push) Successful in 2m55s
CI / golangci-lint (push) Successful in 3m13s
CI / Security scan (prod) (push) Successful in 4m8s
CI / Security scan (dev) (push) Successful in 4m15s
CI / Tests (prod) (push) Has been skipped
CI / Tests (dev) (push) Has been skipped
CI / Race (prod) (push) Has been skipped
CI / Race (dev) (push) Has been skipped
This commit is contained in:
@@ -452,6 +452,7 @@ jobs:
|
|||||||
run: go test -tags "${{ matrix.gotags }}" -count=1 -timeout 1800s ${{ matrix.verbose }} ${{ matrix.coverflags }} ./...
|
run: go test -tags "${{ matrix.gotags }}" -count=1 -timeout 1800s ${{ matrix.verbose }} ${{ matrix.coverflags }} ./...
|
||||||
env:
|
env:
|
||||||
GO_TESTING: "1"
|
GO_TESTING: "1"
|
||||||
|
DAV_SKIP_INIT: "1"
|
||||||
POSTGRES_HOST: postgres
|
POSTGRES_HOST: postgres
|
||||||
TEST_DB_HOST: postgres
|
TEST_DB_HOST: postgres
|
||||||
|
|
||||||
@@ -542,6 +543,7 @@ jobs:
|
|||||||
run: go test -tags "${{ matrix.gotags }}" -race -count=1 -timeout 1800s ./...
|
run: go test -tags "${{ matrix.gotags }}" -race -count=1 -timeout 1800s ./...
|
||||||
env:
|
env:
|
||||||
GO_TESTING: "1"
|
GO_TESTING: "1"
|
||||||
|
DAV_SKIP_INIT: "1"
|
||||||
POSTGRES_HOST: postgres
|
POSTGRES_HOST: postgres
|
||||||
TEST_DB_HOST: postgres
|
TEST_DB_HOST: postgres
|
||||||
CGO_ENABLED: "1"
|
CGO_ENABLED: "1"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ var Service *BaseService
|
|||||||
func init() {
|
func init() {
|
||||||
if err := connect(); err != nil {
|
if err := connect(); err != nil {
|
||||||
// Don't fatal in test mode - tests will use testdb instead
|
// Don't fatal in test mode - tests will use testdb instead
|
||||||
if os.Getenv("GO_TESTING") != "" {
|
if os.Getenv("DAV_SKIP_INIT") != "" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
panic("failed to initialize dev service: " + err.Error())
|
panic("failed to initialize dev service: " + err.Error())
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ var Service *BaseService
|
|||||||
func init() {
|
func init() {
|
||||||
if err := connect(); err != nil {
|
if err := connect(); err != nil {
|
||||||
// Don't fatal in test mode - tests will use testdb instead
|
// Don't fatal in test mode - tests will use testdb instead
|
||||||
if os.Getenv("GO_TESTING") != "" {
|
if os.Getenv("DAV_SKIP_INIT") != "" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
panic("failed to initialize prod service: " + err.Error())
|
panic("failed to initialize prod service: " + err.Error())
|
||||||
|
|||||||
Reference in New Issue
Block a user