Skip to content

Commit 72a2d63

Browse files
Add build tag to atlas-connect tests
1 parent 9922f9f commit 72a2d63

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ tasks:
105105
test-oidc-remote: bash etc/run-oidc-remote-test.sh
106106

107107
test-atlas-connect:
108-
- go test -v -run ^TestAtlas$ go.mongodb.org/mongo-driver/v2/internal/cmd/testatlas >> test.suite
108+
- go test -v -run ^TestAtlas$ go.mongodb.org/mongo-driver/v2/internal/cmd/testatlas -tags atlastest >> test.suite
109109

110110
test-awskms: bash etc/run-awskms-test.sh
111111

internal/cmd/testatlas/atlas_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// not use this file except in compliance with the License. You may obtain
55
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
66

7+
//go:build atlastest
8+
// +build atlastest
9+
710
package main
811

912
import (
@@ -122,9 +125,7 @@ func TestAtlas(t *testing.T) {
122125
for _, tc := range cases {
123126
t.Run(fmt.Sprintf("%s (%s)", tc.name, tc.envVar), func(t *testing.T) {
124127
uri := os.Getenv(tc.envVar)
125-
if uri == "" {
126-
t.Skipf("Environment variable %q is not set", tc.envVar)
127-
}
128+
require.NotEmpty(t, uri, "Environment variable %s is not set", tc.envVar)
128129

129130
if tc.certKeyFile != "" {
130131
uri = addTLSCertKeyFile(t, tc.certKeyFile, uri)

0 commit comments

Comments
 (0)