Skip to content

Commit

Permalink
fix config unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Rowan Jacobs <rojacobs@pivotal.io>
  • Loading branch information
crhntr authored and rowanjacobs committed Jul 9, 2018
1 parent 86f3c25 commit e861ce2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions config/load_state_test.go
@@ -1,7 +1,6 @@
package config_test

import (
"bytes"
"errors"
"fmt"
"io/ioutil"
Expand Down Expand Up @@ -180,10 +179,6 @@ var _ = Describe("LoadState", func() {
})

Context("when an external bbl-state is specified", func() {
BeforeEach(func() {
fakeDownloader.DownloadCall.Returns.State = ioutil.NopCloser(bytes.NewReader([]byte("some-remote-state")))
})

It("downloads the bbl state", func() {
_, err := c.Bootstrap(bootstrapArgs([]string{
"bbl", "print-env",
Expand Down
6 changes: 3 additions & 3 deletions fakes/downloader.go
Expand Up @@ -18,8 +18,8 @@ type Downloader struct {
}

func (d *Downloader) DownloadAndPrepareState(flags config.GlobalFlags) error {
d.DownloadAndPrepareStateCall.CallCount++
d.DownloadAndPrepareStateCall.Receives.GlobalFlags = flags
d.DownloadCall.CallCount++
d.DownloadCall.Receives.GlobalFlags = flags

return d.DownloadAndPrepareStateCall.Returns.Error
return d.DownloadCall.Returns.Error
}

0 comments on commit e861ce2

Please sign in to comment.