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

Unified Diff: client/internal/logdog/butler/butler_test.go

Issue 1906023002: LogDog: Add project namespace to Butler/Collector. (Closed) Base URL: https://github.com/luci/luci-go@logdog-project-archivist
Patch Set: Rebase? Created 4 years, 8 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 | « client/internal/logdog/butler/butler.go ('k') | client/logdog/butlerlib/bootstrap/bootstrap.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/internal/logdog/butler/butler_test.go
diff --git a/client/internal/logdog/butler/butler_test.go b/client/internal/logdog/butler/butler_test.go
index f84a1edec85630930be9e17e5f896a08ad1050c8..782b9df6782e0e3445ac6469d34ff8e89acc2905 100644
--- a/client/internal/logdog/butler/butler_test.go
+++ b/client/internal/logdog/butler/butler_test.go
@@ -228,8 +228,10 @@ func TestConfig(t *testing.T) {
maxSize: 1024,
}
conf := Config{
- Output: &to,
- Prefix: "unit/test",
+ Output: &to,
+ Prefix: "unit/test",
+ Project: "test-project",
+ Secret: types.PrefixSecret(bytes.Repeat([]byte{0x55}, types.PrefixSecretLength)),
}
Convey(`Will validate.`, func() {
@@ -243,7 +245,12 @@ func TestConfig(t *testing.T) {
Convey(`Will not validate with an invalid Prefix.`, func() {
conf.Prefix = "!!!!invalid!!!!"
- So(conf.Validate(), ShouldErrLike, "invalid Prefix")
+ So(conf.Validate(), ShouldErrLike, "invalid prefix")
+ })
+
+ Convey(`Will not validate with an invalid Project.`, func() {
+ conf.Project = "!!!!invalid!!!!"
+ So(conf.Validate(), ShouldErrLike, "invalid project")
})
})
}
@@ -274,6 +281,8 @@ func TestButler(t *testing.T) {
OutputWorkers: 1,
BufferLogs: false,
Prefix: "unit/test",
+ Project: "test-project",
+ Secret: types.PrefixSecret(bytes.Repeat([]byte{0x55}, types.PrefixSecretLength)),
TeeStdout: &teeStdout,
TeeStderr: &teeStderr,
}
« no previous file with comments | « client/internal/logdog/butler/butler.go ('k') | client/logdog/butlerlib/bootstrap/bootstrap.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698