Merge lp:~dimitern/juju-core/lp-1308146-1.18-backport into lp:juju-core/1.18
Proposed by
Dimiter Naydenov
Status: | Merged |
---|---|
Approved by: | Martin Packman |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2298 |
Proposed branch: | lp:~dimitern/juju-core/lp-1308146-1.18-backport |
Merge into: | lp:juju-core/1.18 |
Diff against target: |
108 lines (+66/-1) 3 files modified
state/charm.go (+11/-0) state/state.go (+10/-1) state/state_test.go (+45/-0) |
To merge this branch: | bzr merge lp:~dimitern/juju-core/lp-1308146-1.18-backport |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Packman (community) | Approve | ||
Review via email: mp+235116@code.launchpad.net |
This proposal supersedes a proposal from 2014-09-18.
Commit message
Fixed lp:1308146 - backported from github/trunk
See http://
the already landed fix from github.
more info, see https:/
Description of the change
Fixed lp:1308146 - backported from github/trunk
See http://
the already landed fix from github.
more info, see https:/
EDIT: Fixed base from lp:juju-core to lp:juju-core/1.18
(lbox propose somehow managed to get it wrong)
To post a comment you must log in.
Reviewers: mp+235115_ code.launchpad. net,
Message:
Please take a look.
Description:
Fixed lp:1308146 - backported from github/trunk
See http:// pad.lv/ 1308146 - this fixes the issue by backporting com/juju/ juju/ trunk - for /github. com/juju/ juju/pull/ 786.
the already landed fix from github.
more info, see https:/
https:/ /code.launchpad .net/~dimitern/ juju-core/ lp-1308146- 1.18-backport/ +merge/ 235115
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/138640043/
Affected files (+85, -12 lines): mongo.go cloudinit/ cloudinit_ test.go instances/ instancetype. go instances/ instancetype_ test.go testing/ tools.go ec2/image_ test.go win-installer/ setup.iss
A [revision details]
M agent/mongo/
M environs/
M environs/
M environs/
M environs/
M provider/
M scripts/
M state/charm.go
M state/state.go
M state/state_test.go
M version/version.go
Index: [revision details] 20140513040856- lm051mdy3n916km 6
=== 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: state/state_test.go state_test. go' sch.BundleSha25 6(), gc.Equals, "missing")
=== modified file 'state/
--- state/state_test.go 2014-03-27 12:53:54 +0000
+++ state/state_test.go 2014-09-18 12:52:26 +0000
@@ -6,6 +6,7 @@
import (
"fmt"
"net/url"
+ "path/filepath"
"sort"
"strconv"
"time"
@@ -340,6 +341,50 @@
c.Assert(
}
+func (s *StateSuite) TestUpdateUploa dedCharmEscapes SpecialCharsInC onfig(c pad.lv/ 1308146. ematicKeys := []byte(` Charms. ClonedDirPath( c.MkDir( ), "dummy") teFile( Join(chDir, "config.yaml"), ematicKeys, chDir) URL("local: quantal/ missing- 1") bundles. testing. invalid/ dummy-1") PrepareLocalCha rmUpload( missingCurl) UpdateUploadedC harm(ch, missingCurl, sch.Revision( ), gc.Equals, missingCurl. Revision) sch.IsUploaded( ), jc.IsTrue) sch.IsPlacehold er(), jc.IsFalse) sch.Meta( ), gc.DeepEquals, ch.Meta()...
*gc.C) {
+ // Make sure when we have mongodb special characters like "$" and
+ // "." in the name of any charm config option, we do proper
+ // escaping before storing them and unescaping after loading. See
+ // also http://
+
+ // Clone the dummy charm and change the config.
+ configWithProbl
+options:
+ $bad.key: {default: bad, description: bad, type: string}
+ not.ok.key: {description: not ok, type: int}
+ valid-key: {description: all good, type: boolean}
+ still$bad.: {description: not good, type: float}
+ $.$: {description: awful, type: string}
+ ...: {description: oh boy, type: int}
+ just$: {description: no no, type: float}
+`[1:])
+ chDir := testing.
+ err := utils.AtomicWri
+ filepath.
+ configWithProbl
+ 0666,
+ )
+ c.Assert(err, gc.IsNil)
+ ch, err := charm.ReadDir(
+ c.Assert(err, gc.IsNil)
+ missingCurl := charm.MustParse
+ bundleURL, err := url.Parse("http://
+ c.Assert(err, gc.IsNil)
+
+ _, err = s.State.
+ c.Assert(err, gc.IsNil)
+ sch, err := s.State.
bundleURL, "missing")
+ c.Assert(err, gc.IsNil)
+ c.Assert(sch.URL(), gc.DeepEquals, missingCurl)
+ c.Assert(
+ c.Assert(
+ c.Assert(
+ c.Assert(