Skip to content

Commit

Permalink
Fix s3 credentials tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tischi committed Nov 25, 2024
1 parent b77fbbc commit d3e4c37
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions src/test/java/org/embl/mobie/io/imagedata/N5ImageDataTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,35 @@ public void openOMEZarrFromEBIS3()
assertNotNull( voxelDimensions );
}

// @Test
// public void openOMEZarrFromS3WithCredentialsWithN5ImageData()
// {
// System.out.println("openOMEZarrFromS3WithCredentials");
// N5ImageData< ? > n5ImageData = new N5ImageData<>(
// "https://s3.embl.de/mobie-credentials-test/test/images/ome-zarr/8kmont5.ome.zarr",
// new String[]{ "4vJRUoUQZix2x7wPRlSy", "qtt7o93uv2PTvXSgYGMtoGtQkd3HsRqVH5XwitSf" });
// VoxelDimensions voxelDimensions = n5ImageData.getSourcePair( 0 ).getB().getVoxelDimensions();
// assertNotNull( voxelDimensions );
// }
//
// @Test
// public void openOMEZarrFromS3WithCredentialsWithImageDataOpener()
// {
// // This test uses the ImageDataOpener ( instead of directly N5ImageData )
// System.out.println("openOMEZarrFromS3WithCredentialsV2");
// ImageDataFormat imageDataFormat = ImageDataFormat.OmeZarrS3;
// imageDataFormat.setS3SecretAndAccessKey(
// new String[]{
// "4vJRUoUQZix2x7wPRlSy",
// "qtt7o93uv2PTvXSgYGMtoGtQkd3HsRqVH5XwitSf"
// } );
// ImageData< ? > imageData = ImageDataOpener.open(
// "https://s3.embl.de/mobie-credentials-test/test/images/ome-zarr/8kmont5.ome.zarr",
// imageDataFormat,
// new SharedQueue( 1 ) );
// VoxelDimensions voxelDimensions = imageData.getSourcePair( 0 ).getB().getVoxelDimensions();
// assertNotNull( voxelDimensions );
// }
@Test
public void openOMEZarrFromS3WithCredentialsWithN5ImageData()
{
System.out.println("openOMEZarrFromS3WithCredentials");
N5ImageData< ? > n5ImageData = new N5ImageData<>(
"https://s3.embl.de/mobie-credentials-test/test/images/ome-zarr/8kmont5.ome.zarr",
new String[]{ "4vJRUoUQZix2x7wPRlSy", "qtt7o93uv2PTvXSgYGMtoGtQkd3HsRqVH5XwitSf" });
VoxelDimensions voxelDimensions = n5ImageData.getSourcePair( 0 ).getB().getVoxelDimensions();
assertNotNull( voxelDimensions );
}

@Test
public void openOMEZarrFromS3WithCredentialsWithImageDataOpener()
{
// This test uses the ImageDataOpener ( instead of directly N5ImageData )
System.out.println("openOMEZarrFromS3WithCredentialsV2");
ImageDataFormat imageDataFormat = ImageDataFormat.OmeZarrS3;
imageDataFormat.setS3SecretAndAccessKey(
new String[]{
"MHLAyeu3fyBAx3egnzOE",
"Dj9SCkDr3XtWEohBKxCcWFZgU0YkpxRK7TndQYmm"
} );
ImageData< ? > imageData = ImageDataOpener.open(
"https://s3.embl.de/mobie-credentials-test/test/images/ome-zarr/8kmont5.ome.zarr",
imageDataFormat,
new SharedQueue( 1 ) );
VoxelDimensions voxelDimensions = imageData.getSourcePair( 0 ).getB().getVoxelDimensions();
assertNotNull( voxelDimensions );
}

@Test
public void openOMEZarrFromS3WithWrongCredentials()
Expand Down

0 comments on commit d3e4c37

Please sign in to comment.