Skip to content

Commit

Permalink
Fix lines that are too long
Browse files Browse the repository at this point in the history
  • Loading branch information
James C. Scott committed Oct 3, 2016
1 parent abc61fc commit 9cbd029
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions commands/get/resources/getter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,29 @@ var _ = Describe("ResourceGetter", func() {
)

Describe("GetLocalResources", func() {
DescribeTable("", func(recursively bool, initMap bool, resources []string, mkdirsError, copyError, copyAllError, expectedError error) {
DescribeTable("", func(recursively bool, initMap bool, resources []string, mkdirsError, copyError,
copyAllError, expectedError error) {
getter := vcsAndLocalFSGetter{}
getter.Parser = createMockParser(nil)
getter.FSUtil = createMockFSUtil(nil, nil, mkdirsError, copyError, copyAllError)
getter.ResourceMap = mapset.Init()
err := getter.GetLocalResources("", resources, "dest", "subfolder", recursively, constants.Standards)
err := getter.GetLocalResources("", resources, "dest", "subfolder",
recursively, constants.Standards)
assert.Equal(GinkgoT(), expectedError, err)
},
Entry("Bad input to reserve", false, true, []string{""}, nil, nil, nil, mapset.ErrEmptyInput),
Entry("Successful recursive copy", true, true, []string{"res"}, nil, nil, nil, nil),
Entry("Successful single copy", false, true, []string{"res"}, nil, nil, nil, nil),
Entry("Failure of single copy", false, true, []string{"res"}, nil, errors.New("single copy fail"), nil, errors.New("single copy fail")),
Entry("Mkdirs", false, true, []string{"res"}, errors.New("mkdirs error"), nil, nil, errors.New("mkdirs error")),
Entry("Failure of single copy", false, true, []string{"res"}, nil,
errors.New("single copy fail"), nil, errors.New("single copy fail")),
Entry("Mkdirs", false, true, []string{"res"},
errors.New("mkdirs error"), nil, nil, errors.New("mkdirs error")),
)
})

Describe("GetRemoteResources", func() {
DescribeTable("", func(downloadEntryError, tempDirError, openAndReadFileError, parserError, expectedError error) {
DescribeTable("", func(downloadEntryError, tempDirError, openAndReadFileError,
parserError, expectedError error) {
// Override remoteSource with a mock.
remoteSource := createMockRemoteSource()
entries := []common.RemoteSource{remoteSource}
Expand All @@ -98,10 +103,14 @@ var _ = Describe("ResourceGetter", func() {
assert.Equal(GinkgoT(), expectedError, err)

},
Entry("fail to parse config", nil, nil, nil, errors.New("error parsing"), errors.New("error parsing")),
Entry("fail to open and read file", nil, nil, errors.New("error reading file"), nil, errors.New("error reading file")),
Entry("fail to download repo", errors.New("error downloading entry"), nil, nil, nil, errors.New("error downloading entry")),
Entry("fail to create temp dir", nil, errors.New("error creating tempdir"), nil, nil, errors.New("error creating tempdir")),
Entry("fail to parse config", nil, nil, nil, errors.New("error parsing"),
errors.New("error parsing")),
Entry("fail to open and read file", nil, nil, errors.New("error reading file"), nil,
errors.New("error reading file")),
Entry("fail to download repo", errors.New("error downloading entry"), nil, nil, nil,
errors.New("error downloading entry")),
Entry("fail to create temp dir", nil, errors.New("error creating tempdir"), nil, nil,
errors.New("error creating tempdir")),
)
})
})
Expand Down

0 comments on commit 9cbd029

Please sign in to comment.