Skip to content
This repository was archived by the owner on Mar 15, 2024. It is now read-only.

Commit 30964b0

Browse files
committed
Clean up GridFSBlobStoreEndpointSpec
1 parent b9cfc25 commit 30964b0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/test/groovy/com/commercehub/jclouds/gridfs/blobstore/GridFSBlobStoreEndpointSpec.groovy

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ import org.jclouds.blobstore.BlobStoreContext
66
import spock.lang.Specification
77

88
import static com.commercehub.jclouds.gridfs.blobstore.Constants.GRIDFS_URI_SCHEME
9+
import static org.jclouds.Constants.PROPERTY_ENDPOINT
910

1011
class GridFSBlobStoreEndpointSpec extends Specification {
1112
private static final HOST = "localhost"
1213
private static final PORT = 27017
13-
private static final GRIDFS_ENDPOINT = "${GRIDFS_URI_SCHEME}://${HOST}:${PORT}"
14-
private static final STANDARD_CONNECTION_STRING = "mongodb://${HOST}:${PORT}"
1514

1615
private BlobStoreContext context
1716
private BlobStore blobStore
1817

1918
private void initBlobStore(String endpoint) {
2019
// TODO: use embedded mongo
2120
def overrides = new Properties()
22-
overrides.setProperty(org.jclouds.Constants.PROPERTY_ENDPOINT, endpoint)
21+
overrides.setProperty(PROPERTY_ENDPOINT, endpoint)
2322
context = ContextBuilder.newBuilder("gridfs")
2423
.overrides(overrides)
2524
.buildView(BlobStoreContext)
@@ -34,11 +33,11 @@ class GridFSBlobStoreEndpointSpec extends Specification {
3433

3534
def "can create blobStore with 'gridfs://' endpoint"() {
3635
expect:
37-
initBlobStore(GRIDFS_ENDPOINT)
36+
initBlobStore("${GRIDFS_URI_SCHEME}://${HOST}:${PORT}")
3837
}
3938

4039
def "can create blobStore with standard connection string endpoint"() {
4140
expect:
42-
initBlobStore(STANDARD_CONNECTION_STRING)
41+
initBlobStore("mongodb://${HOST}:${PORT}")
4342
}
4443
}

0 commit comments

Comments
 (0)