LEFT | RIGHT |
(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 local_test | 4 package local_test |
5 | 5 |
6 import ( | 6 import ( |
7 "os" | 7 "os" |
8 "path/filepath" | 8 "path/filepath" |
9 "runtime" | 9 "runtime" |
10 "syscall" | 10 "syscall" |
11 | 11 |
12 gc "launchpad.net/gocheck" | 12 gc "launchpad.net/gocheck" |
13 | 13 |
14 "launchpad.net/juju-core/environs/config" | 14 "launchpad.net/juju-core/environs/config" |
15 » "launchpad.net/juju-core/environs/provider" | 15 » "launchpad.net/juju-core/provider" |
16 » "launchpad.net/juju-core/environs/provider/local" | 16 » "launchpad.net/juju-core/provider/local" |
17 "launchpad.net/juju-core/testing" | 17 "launchpad.net/juju-core/testing" |
18 ) | 18 ) |
19 | 19 |
20 type configSuite struct { | 20 type configSuite struct { |
21 baseProviderSuite | 21 baseProviderSuite |
22 oldUser string | 22 oldUser string |
23 } | 23 } |
24 | 24 |
25 var _ = gc.Suite(&configSuite{}) | 25 var _ = gc.Suite(&configSuite{}) |
26 | 26 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 c.Assert(err, gc.IsNil) | 209 c.Assert(err, gc.IsNil) |
210 // Check that the dirs are owned by the UID/GID set above.. | 210 // Check that the dirs are owned by the UID/GID set above.. |
211 for _, dir := range local.CheckDirs(c, testConfig) { | 211 for _, dir := range local.CheckDirs(c, testConfig) { |
212 info, err := os.Stat(dir) | 212 info, err := os.Stat(dir) |
213 c.Assert(err, gc.IsNil) | 213 c.Assert(err, gc.IsNil) |
214 // This call is linux specific, but then so is sudo | 214 // This call is linux specific, but then so is sudo |
215 c.Assert(info.Sys().(*syscall.Stat_t).Uid, gc.Equals, uint32(100
0)) | 215 c.Assert(info.Sys().(*syscall.Stat_t).Uid, gc.Equals, uint32(100
0)) |
216 c.Assert(info.Sys().(*syscall.Stat_t).Gid, gc.Equals, uint32(100
0)) | 216 c.Assert(info.Sys().(*syscall.Stat_t).Gid, gc.Equals, uint32(100
0)) |
217 } | 217 } |
218 } | 218 } |
LEFT | RIGHT |