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

Unified Diff: agent/tools/storage_test.go

Issue 11561044: Make agent/tools and remove state.Tools
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: agent/tools/storage_test.go
=== renamed file 'environs/tools/storage_test.go' => 'agent/tools/storage_test.go'
--- environs/tools/storage_test.go 2013-05-02 15:55:42 +0000
+++ agent/tools/storage_test.go 2013-07-22 03:46:45 +0000
@@ -7,21 +7,21 @@
"bytes"
"io"
"io/ioutil"
+ "net/http"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "sort"
+ "strings"
+
. "launchpad.net/gocheck"
+
+ "launchpad.net/juju-core/agent/tools"
"launchpad.net/juju-core/environs"
"launchpad.net/juju-core/environs/dummy"
envtesting "launchpad.net/juju-core/environs/testing"
- "launchpad.net/juju-core/environs/tools"
- "launchpad.net/juju-core/log"
- "launchpad.net/juju-core/state"
"launchpad.net/juju-core/testing"
"launchpad.net/juju-core/version"
- "net/http"
- "os"
- "os/exec"
- "path/filepath"
- "sort"
- "strings"
)
type StorageSuite struct {
@@ -170,7 +170,7 @@
// downloadTools downloads the supplied tools and extracts them into a
// new directory.
-func downloadTools(c *C, t *state.Tools) string {
+func downloadTools(c *C, t *tools.Tools) string {
resp, err := http.Get(t.URL)
c.Assert(err, IsNil)
defer resp.Body.Close()
@@ -183,17 +183,14 @@
}
// downloadToolsRaw downloads the supplied tools and returns the raw bytes.
-func downloadToolsRaw(c *C, t *state.Tools) []byte {
- log.Infof("dtr1")
+func downloadToolsRaw(c *C, t *tools.Tools) []byte {
resp, err := http.Get(t.URL)
c.Assert(err, IsNil)
defer resp.Body.Close()
- log.Infof("dtr5")
c.Assert(resp.StatusCode, Equals, http.StatusOK)
var buf bytes.Buffer
_, err = io.Copy(&buf, resp.Body)
c.Assert(err, IsNil)
- log.Infof("dtr9")
return buf.Bytes()
}

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