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

Delta Between Two Patch Sets: cmd/juju/environment_test.go

Issue 68990043: System SSH key upgrader (Closed)
Left Patch Set: Created 11 years, 1 month ago
Right Patch Set: System SSH key upgrader Created 11 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « cmd/juju/destroyservice.go ('k') | cmd/juju/main_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2013 Canonical Ltd. 1 // Copyright 2013 Canonical Ltd.
2 // Licensed under the AGPLv3, see LICENCE file for details. 2 // Licensed under the AGPLv3, see LICENCE file for details.
3 3
4 package main 4 package main
5 5
6 import ( 6 import (
7 "fmt" 7 "fmt"
8 "strings" 8 "strings"
9 9
10 gc "launchpad.net/gocheck" 10 gc "launchpad.net/gocheck"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 c.Assert(output, gc.Equals, "raring") 161 c.Assert(output, gc.Equals, "raring")
162 } 162 }
163 163
164 var immutableConfigTests = map[string]string{ 164 var immutableConfigTests = map[string]string{
165 "name": "foo", 165 "name": "foo",
166 "type": "foo", 166 "type": "foo",
167 "firewall-mode": "global", 167 "firewall-mode": "global",
168 "state-port": "1", 168 "state-port": "1",
169 "api-port": "666", 169 "api-port": "666",
170 "syslog-port": "42",
171 } 170 }
172 171
173 func (s *SetEnvironmentSuite) TestImmutableConfigValues(c *gc.C) { 172 func (s *SetEnvironmentSuite) TestImmutableConfigValues(c *gc.C) {
174 for name, value := range immutableConfigTests { 173 for name, value := range immutableConfigTests {
175 param := fmt.Sprintf("%s=%s", name, value) 174 param := fmt.Sprintf("%s=%s", name, value)
176 _, err := testing.RunCommand(c, &SetEnvironmentCommand{}, []stri ng{param}) 175 _, err := testing.RunCommand(c, &SetEnvironmentCommand{}, []stri ng{param})
177 errorPattern := fmt.Sprintf("cannot change %s from .* to [\"]?%v [\"]?", name, value) 176 errorPattern := fmt.Sprintf("cannot change %s from .* to [\"]?%v [\"]?", name, value)
178 c.Assert(err, gc.ErrorMatches, errorPattern) 177 c.Assert(err, gc.ErrorMatches, errorPattern)
179 } 178 }
180 } 179 }
LEFTRIGHT

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