Skip to content

Commit

Permalink
fix(openstack): Fix to have the OpenstackImageV1Provider return all i…
Browse files Browse the repository at this point in the history
…mages when requested. (#1561)
  • Loading branch information
danveloper authored and Matt Duftler committed Apr 6, 2017
1 parent 37b9078 commit 16b3f3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -29,14 +29,14 @@ class OpenstackImageV1Provider implements OpenstackImageProvider, OpenstackReque
@Override
List<Image> listImages(String region, Map<String, String> filters) {
handleRequest {
getRegionClient(region).images().list(filters)
getRegionClient(region).images().listAll(filters)
}
}

@Override
List<Image> listImages(String region) {
handleRequest {
getRegionClient(region).images().list(null)
getRegionClient(region).images().listAll(null)
}
}

Expand Down
Expand Up @@ -36,7 +36,7 @@ class OpenstackImageV1ClientProviderSpec extends OpenstackClientProviderSpec {

then:
1 * mockClient.images() >> imageService
1 * imageService.list(filters) >> images
1 * imageService.listAll(filters) >> images

and:
result == images
Expand All @@ -54,7 +54,7 @@ class OpenstackImageV1ClientProviderSpec extends OpenstackClientProviderSpec {

then:
1 * mockClient.images() >> imageService
1 * imageService.list(filters) >> { throw throwable }
1 * imageService.listAll(filters) >> { throw throwable }

and:
OpenstackProviderException openstackProviderException = thrown(OpenstackProviderException)
Expand Down

0 comments on commit 16b3f3e

Please sign in to comment.