Skip to content

Commit

Permalink
fix go vet errors in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ljfranklin committed Aug 31, 2018
1 parent f17f7bf commit 93c6d69
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion acceptance/export_installation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var _ = Describe("export-installation command", func() {
Eventually(session, 5).Should(gexec.Exit(0))
Expect(session.Err).To(gbytes.Say("exporting installation"))
Expect(session.Err).To(gbytes.Say("waiting for response"))
Expect(session.Err).To(gbytes.Say(`100(\.\d+)?%`))
Expect(session.Err).To(gbytes.Say(`100(\.\d+)?`))
Expect(session.Err).To(gbytes.Say("finished exporting installation"))

content, err := ioutil.ReadFile(outputFileName)
Expand Down
3 changes: 2 additions & 1 deletion acceptance/tile_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ import (
var _ = Describe("tile-metadata command", func() {
var (
productFile *os.File
err error
)

BeforeEach(func() {
var err error
productFile, err = ioutil.TempFile("", "fake-tile")
Expect(err).NotTo(HaveOccurred())
z := zip.NewWriter(productFile)

f, err := z.Create("metadata/fake-tile.yml")
Expand Down
7 changes: 2 additions & 5 deletions acceptance/unstage_product_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (

var _ = Describe("unstage-product command", func() {
var (
stageRequest string
stageRequestMethod string
server *httptest.Server
)
Expand Down Expand Up @@ -60,9 +59,8 @@ var _ = Describe("unstage-product command", func() {
}
responseString = `{}`
stageRequestMethod = req.Method
reqBody, err := ioutil.ReadAll(req.Body)
_, err := ioutil.ReadAll(req.Body)
Expect(err).NotTo(HaveOccurred())
stageRequest = string(reqBody)
default:
out, err := httputil.DumpRequest(req, true)
Expect(err).NotTo(HaveOccurred())
Expand Down Expand Up @@ -115,9 +113,8 @@ var _ = Describe("unstage-product command", func() {
}
responseString = `[]`
stageRequestMethod = req.Method
reqBody, err := ioutil.ReadAll(req.Body)
_, err := ioutil.ReadAll(req.Body)
Expect(err).NotTo(HaveOccurred())
stageRequest = string(reqBody)
default:
out, err := httputil.DumpRequest(req, true)
Expect(err).NotTo(HaveOccurred())
Expand Down
4 changes: 0 additions & 4 deletions api/installation_asset_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,12 @@ var _ = Describe("InstallationAssetService", func() {
Describe("DownloadInstallationAssetCollection", func() {
var (
outputFile *os.File
bar *fakes.Progress
liveWriter *fakes.LiveWriter
)

BeforeEach(func() {
var err error
liveWriter = &fakes.LiveWriter{}
outputFile, err = ioutil.TempFile("", "")
Expect(err).NotTo(HaveOccurred())
bar = &fakes.Progress{}
})

AfterEach(func() {
Expand Down

0 comments on commit 93c6d69

Please sign in to comment.