Skip to content

Commit

Permalink
featuretests: patch out apt-get commands
Browse files Browse the repository at this point in the history
  • Loading branch information
axw committed Dec 16, 2015
1 parent 43c3de5 commit 6a3e5fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions featuretests/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/juju/names"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/arch"
pacman "github.com/juju/utils/packaging/manager"
"github.com/juju/utils/series"
gc "gopkg.in/check.v1"

Expand Down Expand Up @@ -67,6 +68,13 @@ func (s *upgradeSuite) SetUpTest(c *gc.C) {
// Ensure we don't fail disk space check.
s.PatchValue(&upgrades.MinDiskSpaceMib, uint64(0))

// Consume apt-get commands that get run before upgrades.
aptCmds := s.AgentSuite.HookCommandOutput(&pacman.CommandOutput, nil, nil)
go func() {
for _ = range aptCmds {
}
}()

// TODO(mjs) - the following should maybe be part of AgentSuite.SetUpTest()
s.PatchValue(&cmdutil.EnsureMongoServer, func(mongo.EnsureServerParams) error {
return nil
Expand Down

0 comments on commit 6a3e5fc

Please sign in to comment.