Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: go/src/infra/tools/kitchen/cook_logdog_test.go

Issue 2154953002: Add infraenv, setup creds and tee for Kitchen. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Add coverage file, restrict platforms to actual Infra platforms. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « go/src/infra/tools/kitchen/cook_logdog.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/tools/kitchen/cook_logdog_test.go
diff --git a/go/src/infra/tools/kitchen/cook_logdog_test.go b/go/src/infra/tools/kitchen/cook_logdog_test.go
index 272221f1f20266b67f88c2bd9883ba1c705a6c57..34b2da68cd3406814a880cdecd1a7611fb17556f 100644
--- a/go/src/infra/tools/kitchen/cook_logdog_test.go
+++ b/go/src/infra/tools/kitchen/cook_logdog_test.go
@@ -20,7 +20,7 @@ func TestCookLogDogPrefix(t *testing.T) {
p cookLogDogParams
env = environ.New([]string{
- "SWARMING_SERVER=server.appspot.com",
+ "SWARMING_SERVER=https://example.appspot.com",
"SWARMING_TASK_ID=1234567890abcdef",
})
)
@@ -36,7 +36,15 @@ func TestCookLogDogPrefix(t *testing.T) {
Convey(`Can generate a LogDog prefix`, func() {
pfx, err := p.getPrefix(env)
So(err, ShouldBeNil)
- So(pfx, ShouldEqual, types.StreamName("swarm/server.appspot.com/1234567890abcdef"))
+ So(pfx, ShouldEqual, types.StreamName("swarm/example.appspot.com/1234567890abcdef"))
+ })
+
+ Convey(`Can generate a LogDog prefix from a host instead of a server URL`, func() {
+ env.Set("SWARMING_SERVER", "example.appspot.com")
+
+ pfx, err := p.getPrefix(env)
+ So(err, ShouldBeNil)
+ So(pfx, ShouldEqual, types.StreamName("swarm/example.appspot.com/1234567890abcdef"))
})
Convey(`If Swarming server is missing from the environment, will fail.`, func() {
« no previous file with comments | « go/src/infra/tools/kitchen/cook_logdog.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698