Skip to content

Commit 9651f4a

Browse files
author
Yushu.Kozaki
committed
tests: support for Cloud Run
1 parent a45b42a commit 9651f4a

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

environ_test.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ import (
66
)
77

88
const (
9-
testProject = "test-project"
10-
testGAEService = "test-gae-service"
11-
testGAEVersion = "test-gae-version"
9+
testProject = "test-project"
10+
testGAEService = "test-gae-service"
11+
testGAEVersion = "test-gae-version"
12+
testRUNService = "test-run-service"
13+
testRUNRevision = "test-run-revision"
1214
)
1315

1416
func init() {
1517
os.Setenv(EnvKeyGoogleCloudProject, testProject)
1618
os.Setenv(EnvKeyGAEServiceName, testGAEService)
1719
os.Setenv(EnvKeyGAEServiceVersion, testGAEVersion)
20+
os.Setenv(EnvKeyRUNServiceName, testRUNService)
21+
os.Setenv(EnvKeyRUNServiceRevision, testRUNRevision)
1822
}
1923

2024
func TestEnviron(t *testing.T) {
@@ -28,4 +32,10 @@ func TestEnviron(t *testing.T) {
2832
if GAEServiceVersion != testGAEVersion {
2933
t.Fatalf("unexpected, expected: %s, actual: %#v", testGAEVersion, GAEServiceVersion)
3034
}
35+
if RUNServiceName != testRUNService {
36+
t.Fatalf("unexpected, expected: %s, actual: %#v", testRUNService, RUNServiceName)
37+
}
38+
if RUNServiceRevision != testRUNRevision {
39+
t.Fatalf("unexpected, expected: %s, actual: %#v", testRUNRevision, RUNServiceRevision)
40+
}
3141
}

0 commit comments

Comments
 (0)