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

Unified Diff: names/relation_test.go

Issue 13490045: names: Support peer relations in tags and names (Closed)
Patch Set: names: Support peer relations in tags and names Created 11 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
« no previous file with comments | « names/relation.go ('k') | names/tag_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: names/relation_test.go
=== modified file 'names/relation_test.go'
--- names/relation_test.go 2013-09-03 11:04:55 +0000
+++ names/relation_test.go 2013-09-11 10:44:20 +0000
@@ -41,9 +41,12 @@
// twice to construct all possible keys.
for i, testRel := range relationNameTests {
for j, testSvc := range serviceNameTests {
- key := testSvc.pattern + ":" + testRel.pattern + " " + testSvc.pattern + ":" + testRel.pattern
- c.Logf("test %d: %q", i+j, key)
- c.Assert(names.IsRelation(key), gc.Equals, testSvc.valid && testRel.valid)
+ peerKey := testSvc.pattern + ":" + testRel.pattern
+ key := peerKey + " " + peerKey
+ isValid := testSvc.valid && testRel.valid
+ c.Logf("test %d: %q -> valid: %v", i*len(serviceNameTests)+j, key, isValid)
+ c.Assert(names.IsRelation(key), gc.Equals, isValid)
+ c.Assert(names.IsRelation(peerKey), gc.Equals, isValid)
}
}
}
« no previous file with comments | « names/relation.go ('k') | names/tag_test.go » ('j') | no next file with comments »

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