~ubuntu-branches/ubuntu/saucy/juju-core/saucy-proposed

« back to all changes in this revision

Viewing changes to src/launchpad.net/juju-core/environs/testing/tools.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-07-11 17:18:27 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130711171827-vjqkg40r0dlf7ys2
Tags: 1.11.2-0ubuntu1
* New upstream release.
* Make juju-core the default juju (LP: #1190634):
  - d/control: Add virtual package juju -> juju-core.
  - d/juju-core.postinst.in: Bump priority of alternatives over that of
    python juju packages.
* Enable for all architectures (LP: #1172505):
  - d/control: Version BD on golang-go to >= 2:1.1.1 to ensure CGO
    support for non-x86 archs, make juju-core Arch: any.
  - d/README.source: Dropped - no longer required.
* d/watch: Updated for new upstream tarball naming.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2013 Canonical Ltd.
 
2
// Licensed under the AGPLv3, see LICENCE file for details.
 
3
 
1
4
package testing
2
5
 
3
6
import (
71
74
        }
72
75
}
73
76
 
 
77
// RemoveFakeTools deletes the fake tools from the supplied storage.
 
78
func RemoveFakeTools(c *C, storage environs.Storage) {
 
79
        toolsVersion := version.Current
 
80
        name := tools.StorageName(toolsVersion)
 
81
        err := storage.Remove(name)
 
82
        c.Check(err, IsNil)
 
83
        if version.Current.Series != config.DefaultSeries {
 
84
                toolsVersion.Series = config.DefaultSeries
 
85
                name := tools.StorageName(toolsVersion)
 
86
                err := storage.Remove(name)
 
87
                c.Check(err, IsNil)
 
88
        }
 
89
}
 
90
 
74
91
// RemoveTools deletes all tools from the supplied storage.
75
92
func RemoveTools(c *C, storage environs.Storage) {
76
93
        names, err := storage.List("tools/juju-")
78
95
        c.Logf("removing files: %v", names)
79
96
        for _, name := range names {
80
97
                err = storage.Remove(name)
81
 
                c.Assert(err, IsNil)
 
98
                c.Check(err, IsNil)
82
99
        }
83
100
}
84
101