Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(306)

Unified Diff: names/tag_test.go

Issue 12551043: state: implement the single FindEntity method
Patch Set: state: implement the single FindEntity method Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: names/tag_test.go
=== modified file 'names/tag_test.go'
--- names/tag_test.go 2013-08-06 10:03:43 +0000
+++ names/tag_test.go 2013-08-07 14:21:04 +0000
@@ -127,6 +127,16 @@
c.Assert(err, gc.ErrorMatches, test.resultErr)
c.Assert(kind, gc.Equals, "")
c.Assert(id, gc.Equals, "")
+
+ // If the tag has a valid kind which matches the
+ // expected kind, test that using an empty
+ // expectKind does not change the error message.
+ if tagKind, err := names.TagKind(test.tag); err == nil && tagKind == test.expectKind {
+ kind, id, err := names.ParseTag(test.tag, "")
+ c.Assert(err, gc.ErrorMatches, test.resultErr)
+ c.Assert(kind, gc.Equals, "")
+ c.Assert(id, gc.Equals, "")
+ }
} else {
c.Assert(err, gc.IsNil)
c.Assert(id, gc.Equals, test.resultId)
« no previous file with comments | « names/tag.go ('k') | state/apiserver/admin.go » ('j') | state/apiserver/common/errors.go » ('J')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b