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

Side by Side Diff: provider/local/environ_test.go

Issue 13355044: environs/config: more restrictive New
Patch Set: environs/config: more restrictive New Created 11 years, 7 months 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:
View unified diff | Download patch
« no previous file with comments | « provider/local/config_test.go ('k') | provider/maas/config_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 local_test 4 package local_test
5 5
6 import ( 6 import (
7 "io/ioutil" 7 "io/ioutil"
8 "os" 8 "os"
9 "path/filepath" 9 "path/filepath"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 s.baseProviderSuite.SetUpTest(c) 55 s.baseProviderSuite.SetUpTest(c)
56 // Construct the directories first. 56 // Construct the directories first.
57 err := local.CreateDirs(c, minimalConfig(c)) 57 err := local.CreateDirs(c, minimalConfig(c))
58 c.Assert(err, gc.IsNil) 58 c.Assert(err, gc.IsNil)
59 s.oldUpstartLocation = local.SetUpstartScriptLocation(c.MkDir()) 59 s.oldUpstartLocation = local.SetUpstartScriptLocation(c.MkDir())
60 s.oldPath = os.Getenv("PATH") 60 s.oldPath = os.Getenv("PATH")
61 s.testPath = c.MkDir() 61 s.testPath = c.MkDir()
62 os.Setenv("PATH", s.testPath+":"+s.oldPath) 62 os.Setenv("PATH", s.testPath+":"+s.oldPath)
63 63
64 // Add in an admin secret 64 // Add in an admin secret
65 » s.Tests.TestConfig.Config["admin-secret"] = "sekrit" 65 » s.Tests.TestConfig["admin-secret"] = "sekrit"
66 s.restoreRootCheck = local.SetRootCheckFunction(func() bool { return tru e }) 66 s.restoreRootCheck = local.SetRootCheckFunction(func() bool { return tru e })
67 s.Tests.SetUpTest(c) 67 s.Tests.SetUpTest(c)
68 s.dbServiceName = "juju-db-" + local.ConfigNamespace(s.Env.Config()) 68 s.dbServiceName = "juju-db-" + local.ConfigNamespace(s.Env.Config())
69 } 69 }
70 70
71 func (s *localJujuTestSuite) TearDownTest(c *gc.C) { 71 func (s *localJujuTestSuite) TearDownTest(c *gc.C) {
72 s.Tests.TearDownTest(c) 72 s.Tests.TearDownTest(c)
73 os.Setenv("PATH", s.oldPath) 73 os.Setenv("PATH", s.oldPath)
74 s.restoreRootCheck() 74 s.restoreRootCheck()
75 local.SetUpstartScriptLocation(s.oldUpstartLocation) 75 local.SetUpstartScriptLocation(s.oldUpstartLocation)
(...skipping 10 matching lines...) Expand all
86 func (s *localJujuTestSuite) StoppedStatus(c *gc.C) { 86 func (s *localJujuTestSuite) StoppedStatus(c *gc.C) {
87 s.MakeTool(c, "status", `echo "some-service stop/waiting"`) 87 s.MakeTool(c, "status", `echo "some-service stop/waiting"`)
88 } 88 }
89 89
90 func (s *localJujuTestSuite) RunningStatus(c *gc.C) { 90 func (s *localJujuTestSuite) RunningStatus(c *gc.C) {
91 s.MakeTool(c, "status", `echo "some-service start/running, process 123"` ) 91 s.MakeTool(c, "status", `echo "some-service start/running, process 123"` )
92 } 92 }
93 93
94 var _ = gc.Suite(&localJujuTestSuite{ 94 var _ = gc.Suite(&localJujuTestSuite{
95 Tests: jujutest.Tests{ 95 Tests: jujutest.Tests{
96 » » TestConfig: jujutest.TestConfig{minimalConfigValues()}, 96 » » TestConfig: minimalConfigValues(),
97 }, 97 },
98 }) 98 })
99 99
100 func (s *localJujuTestSuite) TestBootstrap(c *gc.C) { 100 func (s *localJujuTestSuite) TestBootstrap(c *gc.C) {
101 c.Skip("Cannot test bootstrap at this stage.") 101 c.Skip("Cannot test bootstrap at this stage.")
102 } 102 }
103 103
104 func (s *localJujuTestSuite) TestStartStop(c *gc.C) { 104 func (s *localJujuTestSuite) TestStartStop(c *gc.C) {
105 c.Skip("StartInstance not implemented yet.") 105 c.Skip("StartInstance not implemented yet.")
106 } 106 }
OLDNEW
« no previous file with comments | « provider/local/config_test.go ('k') | provider/maas/config_test.go » ('j') | no next file with comments »

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