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

Delta Between Two Patch Sets: container/lxc/initialisation_test.go

Issue 72270044: lxc: Fixed target-release issue precise/maas
Left Patch Set: cloudinit: Fixed target-release issue precise/maas Created 11 years, 1 month ago
Right Patch Set: lxc: Fixed target-release issue precise/maas 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
LEFTRIGHT
(no file at all)
1 // Copyright 2013 Canonical Ltd.
2 // Licensed under the AGPLv3, see LICENCE file for details.
3
4 package lxc
5
6 import (
7 stdtesting "testing"
8
9 gc "launchpad.net/gocheck"
10
11 "launchpad.net/juju-core/testing/testbase"
12 "launchpad.net/juju-core/utils"
13 )
14
15 func Test(t *stdtesting.T) {
16 gc.TestingT(t)
17 }
18
19 type InitialiserSuite struct {
20 testbase.LoggingSuite
21 }
22
23 var _ = gc.Suite(&InitialiserSuite{})
24
25 func (s *InitialiserSuite) TestLTSSeriesPackages(c *gc.C) {
26 cmdChan := s.HookCommandOutput(&utils.AptCommandOutput, []byte{}, nil)
27 container := NewContainerInitialiser("precise")
28 err := container.Initialise()
29 c.Assert(err, gc.IsNil)
30
31 cmd := <-cmdChan
32 c.Assert(cmd.Args, gc.DeepEquals, []string{
33 "apt-get", "--option=Dpkg::Options::=--force-confold",
34 "--option=Dpkg::options::=--force-unsafe-io", "--assume-yes", "- -quiet",
35 "install", "--target-release", "precise-updates/cloud-tools", "l xc",
36 })
37 }
38
39 func (s *InitialiserSuite) TestNoSeriesPackages(c *gc.C) {
40 cmdChan := s.HookCommandOutput(&utils.AptCommandOutput, []byte{}, nil)
41 container := NewContainerInitialiser("")
42 err := container.Initialise()
43 c.Assert(err, gc.IsNil)
44
45 cmd := <-cmdChan
46 c.Assert(cmd.Args, gc.DeepEquals, []string{
47 "apt-get", "--option=Dpkg::Options::=--force-confold",
48 "--option=Dpkg::options::=--force-unsafe-io", "--assume-yes", "- -quiet",
49 "install", "lxc",
50 })
51 }
LEFTRIGHT

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