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

Unified Diff: common/proto/google/descriptor/util_test.go

Issue 2219023003: Update APIs to use new Google cloud paths. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 4 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: common/proto/google/descriptor/util_test.go
diff --git a/common/proto/google/descriptor/util_test.go b/common/proto/google/descriptor/util_test.go
deleted file mode 100644
index e15f8974be695f2512fb0b2974010b4136e02392..0000000000000000000000000000000000000000
--- a/common/proto/google/descriptor/util_test.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2016 The LUCI Authors. All rights reserved.
-// Use of this source code is governed under the Apache License, Version 2.0
-// that can be found in the LICENSE file.
-
-package descriptor
-
-import (
- "testing"
-
- "io/ioutil"
-
- "github.com/golang/protobuf/proto"
- . "github.com/smartystreets/goconvey/convey"
-)
-
-func TestUtil(t *testing.T) {
- t.Parallel()
-
- Convey("Util", t, func() {
- descFileBytes, err := ioutil.ReadFile("util_test.desc")
- So(err, ShouldBeNil)
-
- var desc FileDescriptorSet
- err = proto.Unmarshal(descFileBytes, &desc)
- So(err, ShouldBeNil)
-
- So(desc.File, ShouldHaveLength, 2)
- file := desc.File[1]
- So(file.GetName(), ShouldEqual, "github.com/luci/luci-go/common/proto/google/descriptor/util_test.proto")
-
- Convey("Resolve works", func() {
- names := []string{
- "pkg.E1",
- "pkg.E1.V0",
-
- "pkg.M1",
- "pkg.M1.f1",
-
- "pkg.M2.f1",
- "pkg.M2.f2",
-
- "pkg.M3.O1",
- "pkg.M3.f1",
- "pkg.M3.O2",
-
- "pkg.S1",
- "pkg.S1.R1",
- "pkg.S2.R2",
-
- "pkg.NestedMessageParent",
- "pkg.NestedMessageParent.NestedMessage",
- "pkg.NestedMessageParent.NestedMessage.f1",
- "pkg.NestedMessageParent.NestedEnum",
- "pkg.NestedMessageParent.NestedEnum.V0",
- }
- for _, n := range names {
- Convey(n, func() {
- actualFile, obj, _ := desc.Resolve(n)
- So(actualFile, ShouldEqual, file)
- So(obj, ShouldNotBeNil)
- })
- }
-
- Convey("wrong name", func() {
- actualFile, obj, path := desc.Resolve("foo")
- So(actualFile, ShouldBeNil)
- So(obj, ShouldBeNil)
- So(path, ShouldBeNil)
- })
- })
- })
-}

Powered by Google App Engine
This is Rietveld 408576698