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

Unified Diff: appengine/logdog/coordinator/coordinatorTest/config.go

Issue 1863973002: LogDog: Update to archival V2. (Closed) Base URL: https://github.com/luci/luci-go@grpcutil-errors
Patch Set: Fix proto comment. 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
Index: appengine/logdog/coordinator/coordinatorTest/config.go
diff --git a/appengine/logdog/coordinator/coordinatorTest/config.go b/appengine/logdog/coordinator/coordinatorTest/config.go
deleted file mode 100644
index d0ea4a273be45877ffc555b9cfad457bb4ee9686..0000000000000000000000000000000000000000
--- a/appengine/logdog/coordinator/coordinatorTest/config.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package coordinatorTest
-
-import (
- "fmt"
-
- "github.com/golang/protobuf/proto"
- "github.com/luci/luci-go/appengine/logdog/coordinator/config"
- "github.com/luci/luci-go/common/config/impl/memory"
- "github.com/luci/luci-go/common/proto/logdog/svcconfig"
- "github.com/luci/luci-go/server/settings"
- "golang.org/x/net/context"
-)
-
-// UseConfig installs a Coordinator configuration into the current context.
-func UseConfig(c context.Context, cc *svcconfig.Coordinator) context.Context {
- c = settings.Use(c, settings.New(&settings.MemoryStorage{}))
- gcfg := config.GlobalConfig{
- ConfigServiceURL: "https://example.com",
- ConfigSet: "services/logdog-test",
- ConfigPath: "coordinator-test.cfg",
- }
- if err := gcfg.Store(c, "test setup"); err != nil {
- panic(fmt.Errorf("failed to store test configuration: %v", err))
- }
-
- cmap := map[string]memory.ConfigSet{
- "services/logdog-test": map[string]string{},
- }
- if cc != nil {
- cfg := svcconfig.Config{
- Coordinator: cc,
- }
- cmap["services/logdog-test"]["coordinator-test.cfg"] = proto.MarshalTextString(&cfg)
- }
- return memory.Use(c, cmap)
-}
« no previous file with comments | « appengine/logdog/coordinator/coordinatorTest/archival.go ('k') | appengine/logdog/coordinator/coordinatorTest/logStream.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698