Merge lp://staging/~sinzui/juju-core/backport-underscores into lp://staging/juju-core/1.16
Proposed by
Curtis Hovey
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Curtis Hovey | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 1976 | ||||
Proposed branch: | lp://staging/~sinzui/juju-core/backport-underscores | ||||
Merge into: | lp://staging/juju-core/1.16 | ||||
Diff against target: |
32 lines (+10/-1) 2 files modified
names/relation.go (+1/-1) names/relation_test.go (+9/-0) |
||||
To merge this branch: | bzr merge lp://staging/~sinzui/juju-core/backport-underscores | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+192937@code.staging.launchpad.net |
Commit message
Backport underscores in relation name fix.
Description of the change
Backport underscores in relation name fix.
Relation names can have underscores.
To post a comment you must log in.
Reviewers: mp+192937_ code.launchpad. net,
Message:
Please take a look.
Description:
Backport underscores in relation name fix.
Relation names can have underscores.
https:/ /code.launchpad .net/~sinzui/ juju-core/ backport- underscores/ +merge/ 192937
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/18640043/
Affected files (+12, -1 lines): test.go
A [revision details]
M names/relation.go
M names/relation_
Index: [revision details] 20131017110030- 3qkmwi95yqtlclz e
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: names/relation.go
=== modified file 'names/relation.go'
--- names/relation.go 2013-09-11 10:23:23 +0000
+++ names/relation.go 2013-10-28 19:07:21 +0000
@@ -9,7 +9,7 @@
"strings"
)
-const RelationSnippet = "[a-z][ a-z0-9] *(-[a-z0- 9]+)*" a-z0-9] *([_-][ a-z0-9] +)*"
+const RelationSnippet = "[a-z][
// Relation keys have the format "service1:relName1 service2:relName2".
// Except the peer relations, which have the format "service:relName"
Index: names/relation_ test.go relation_ test.go' test.go 2013-09-11 11:21:28 +0000 test.go 2013-10-28 19:07:21 +0000
=== modified file 'names/
--- names/relation_
+++ names/relation_
@@ -33,6 +33,15 @@
{pattern: "42also-not", valid: false},
{pattern: "042", valid: false},
{pattern: "0x42", valid: false},
+ {pattern: "foo_42", valid: true},
+ {pattern: "_foo", valid: false},
+ {pattern: "!foo", valid: false},
+ {pattern: "foo_bar-baz_boo", valid: true},
+ {pattern: "foo bar", valid: false},
+ {pattern: "foo-_", valid: false},
+ {pattern: "foo-", valid: false},
+ {pattern: "foo_-a", valid: false},
+ {pattern: "foo_", valid: false},
}
func (s *relationSuite) TestRelationKey Formats( c *gc.C) {