Merge lp://staging/~thumper/golxc/mockable into lp://staging/golxc
Status: | Merged |
---|---|
Merged at revision: | 5 |
Proposed branch: | lp://staging/~thumper/golxc/mockable |
Merge into: | lp://staging/golxc |
Diff against target: |
1504 lines (+1044/-91) 8 files modified
COPYING (+674/-0) COPYING.LESSER (+165/-0) LICENSE (+15/-0) config.go (+3/-0) export_test.go (+5/-2) golxc.go (+133/-45) golxc_test.go (+46/-44) network.go (+3/-0) |
To merge this branch: | bzr merge lp://staging/~thumper/golxc/mockable |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Frank Mueller (community) | Approve | ||
Ian Booth | Approve | ||
Review via email: mp+169317@code.staging.launchpad.net |
Description of the change
Provide interfaces around the core parts.
In order to provide meaningful tests around code that is using golxc
without shelling out to real lxc commands, we need to depend only on
interfaces. The two main package level functions, New and List are
now methods on a ContainerFactory. The instances themselves implement
Container. Since this is now an interface, added methods for getting
and setting the log file and level.
Also, Create now takes a config file option. I found through trial
and error that if you specify a mount point in the config file, and
only pass that config file through at Start time, the mount
fails. However passing exactly the same config file through at Create
time, and not at Start time has it succeed.
Please take a look.