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

Unified Diff: logdog/appengine/coordinator/endpoints/registration/registerPrefix_test.go

Issue 2991253004: [logdog] Remove list functionality. (Closed)
Patch Set: fix test Created 3 years, 4 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: logdog/appengine/coordinator/endpoints/registration/registerPrefix_test.go
diff --git a/logdog/appengine/coordinator/endpoints/registration/registerPrefix_test.go b/logdog/appengine/coordinator/endpoints/registration/registerPrefix_test.go
index 19e24e79e6a66102543e0ff943fe39c4954aad70..e170699fbf5630f5da24b02931229dcbe32e9cd4 100644
--- a/logdog/appengine/coordinator/endpoints/registration/registerPrefix_test.go
+++ b/logdog/appengine/coordinator/endpoints/registration/registerPrefix_test.go
@@ -28,7 +28,6 @@ import (
"github.com/luci/luci-go/logdog/api/endpoints/coordinator/registration/v1"
"github.com/luci/luci-go/logdog/appengine/coordinator"
ct "github.com/luci/luci-go/logdog/appengine/coordinator/coordinatorTest"
- "github.com/luci/luci-go/logdog/appengine/coordinator/hierarchy"
"github.com/luci/luci-go/logdog/common/types"
"github.com/luci/luci-go/luci_config/common/cfgtypes"
@@ -113,23 +112,6 @@ func TestRegisterPrefix(t *testing.T) {
Expiration: ds.RoundTime(clock.Now(c).Add(24 * time.Hour)),
})
- // Should have registered path components.
- getComponents := func(b string) []string {
- l, err := hierarchy.Get(c, hierarchy.Request{Project: "proj-foo", PathBase: b})
- if err != nil {
- panic(err)
- }
- names := make([]string, len(l.Comp))
- for i, e := range l.Comp {
- names[i] = e.Name
- }
- return names
- }
- So(getComponents(""), ShouldResemble, []string{"testing"})
- So(getComponents("testing"), ShouldResemble, []string{"prefix"})
- So(getComponents("testing/prefix"), ShouldResemble, []string{"+"})
- So(getComponents("testing/prefix/+"), ShouldResemble, []string{})
-
Convey(`Will refuse to register it again.`, func() {
_, err := svr.RegisterPrefix(c, &req)
So(err, ShouldBeRPCAlreadyExists)

Powered by Google App Engine
This is Rietveld 408576698