From b8b956a05d1e3f4e271649ab4ba2e337365cacf4 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 10 Jun 2024 09:46:58 -0700 Subject: [PATCH] add changes to Makefile to support dev build --- Makefile | 12 ++++++------ internal/http/listener_test.go | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e80797a66..fb601fb69 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ lint-fix: getdeps ## runs golangci-lint suite of linters with automatic fixes check: test test: verifiers build ## builds minio, runs linters, tests @echo "Running unit tests" - @MINIO_API_REQUESTS_MAX=10000 CGO_ENABLED=0 go test -v -tags kqueue ./... + @MINIO_API_REQUESTS_MAX=10000 CGO_ENABLED=0 go test -v -tags kqueue,dev ./... test-root-disable: install-race @echo "Running minio root lockdown tests" @@ -84,13 +84,13 @@ test-race: verifiers build ## builds minio, runs linters, tests (race) @echo "Running unit tests under -race" @(env bash $(PWD)/buildscripts/race.sh) -test-iam: build ## verify IAM (external IDP, etcd backends) +test-iam: install-race ## verify IAM (external IDP, etcd backends) @echo "Running tests for IAM (external IDP, etcd backends)" - @MINIO_API_REQUESTS_MAX=10000 CGO_ENABLED=0 go test -tags kqueue -v -run TestIAM* ./cmd + @MINIO_API_REQUESTS_MAX=10000 CGO_ENABLED=0 go test -tags kqueue,dev -v -run TestIAM* ./cmd @echo "Running tests for IAM (external IDP, etcd backends) with -race" - @MINIO_API_REQUESTS_MAX=10000 GORACE=history_size=7 CGO_ENABLED=1 go test -race -tags kqueue -v -run TestIAM* ./cmd + @MINIO_API_REQUESTS_MAX=10000 GORACE=history_size=7 CGO_ENABLED=1 go test -race -tags kqueue,dev -v -run TestIAM* ./cmd -test-iam-ldap-upgrade-import: build ## verify IAM (external LDAP IDP) +test-iam-ldap-upgrade-import: install-race ## verify IAM (external LDAP IDP) @echo "Running upgrade tests for IAM (LDAP backend)" @env bash $(PWD)/buildscripts/minio-iam-ldap-upgrade-import-test.sh @@ -196,7 +196,7 @@ docker: build ## builds minio docker container install-race: checks build-debugging ## builds minio to $(PWD) @echo "Building minio binary with -race to './minio'" - @GORACE=history_size=7 CGO_ENABLED=1 go build -tags kqueue -race -trimpath --ldflags "$(LDFLAGS)" -o $(PWD)/minio 1>/dev/null + @GORACE=history_size=7 CGO_ENABLED=1 go build -tags kqueue,dev -race -trimpath --ldflags "$(LDFLAGS)" -o $(PWD)/minio 1>/dev/null @echo "Installing minio binary with -race to '$(GOPATH)/bin/minio'" @mkdir -p $(GOPATH)/bin && cp -af $(PWD)/minio $(GOPATH)/bin/minio diff --git a/internal/http/listener_test.go b/internal/http/listener_test.go index 1c0f55a58..717b1372c 100644 --- a/internal/http/listener_test.go +++ b/internal/http/listener_test.go @@ -148,8 +148,8 @@ func TestNewHTTPListener(t *testing.T) { {[]string{"[::1:65432", "unknown-host:-1"}, time.Duration(0), time.Duration(0), time.Duration(0), []bool{true, true}}, // 7 {[]string{"localhost:0"}, time.Duration(0), time.Duration(0), time.Duration(0), []bool{false}}, // 8 {[]string{"localhost:0"}, time.Duration(0), time.Duration(0), time.Duration(0), []bool{false}}, // 9 - {[]string{"[::1]:9090", "127.0.0.1:90900"}, time.Duration(0), time.Duration(0), time.Duration(0), []bool{false}}, // 10 - {[]string{"[::1]:9090", "localhost:0"}, time.Duration(0), time.Duration(0), time.Duration(0), []bool{false}}, // 10 + {[]string{"[::1]:3737", "127.0.0.1:90900"}, time.Duration(0), time.Duration(0), time.Duration(0), []bool{false, true}}, // 10 + {[]string{"[::1]:3737", "localhost:0"}, time.Duration(0), time.Duration(0), time.Duration(0), []bool{false, false}}, // 10 } for testIdx, testCase := range testCases {