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

Unified Diff: impl/dummy/dummy_test.go

Issue 2977773002: [dummy/info] Mock ModuleHostname and related functions. (Closed)
Patch Set: Created 3 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 | « impl/dummy/dummy.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/dummy/dummy_test.go
diff --git a/impl/dummy/dummy_test.go b/impl/dummy/dummy_test.go
index 0a998e74a7ad0ab5f742b6324177ff455441eae7..e4dbfd09cb625e2cc403f03ba3cf9254c3bd9adf 100644
--- a/impl/dummy/dummy_test.go
+++ b/impl/dummy/dummy_test.go
@@ -56,6 +56,16 @@ func TestContextAccess(t *testing.T) {
defer p()
infoS.Raw(c).Datacenter()
}, ShouldPanicWith, "dummy: method Info.Datacenter is not implemented")
+
+ Convey("ModuleHostname", func() {
+ host, err := infoS.ModuleHostname(c, "", "", "")
+ So(err, ShouldBeNil)
+ So(host, ShouldEqual, "version.module.dummy-appid.example.com")
+
+ host, err = infoS.ModuleHostname(c, "wut", "10", "")
+ So(err, ShouldBeNil)
+ So(host, ShouldEqual, "10.wut.dummy-appid.example.com")
+ })
})
Convey("Datastore", func() {
« no previous file with comments | « impl/dummy/dummy.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698