Skip to content

Commit

Permalink
DC-839: Move references back to datarepo-client; Upgrade to latest (#175
Browse files Browse the repository at this point in the history
)

https://broadworkbench.atlassian.net/browse/DC-839
_______
With the DataBiosphere/jade-data-repo#1581 for
data repo, we're switching back to only publishing to one Jakarta backed
client. This PR moves your references to the jakarta client back to the
main data repo client and bumps to the latest version. This is an effort
to alleviate any confusion around upgrading past the last supported
datarepo-jakarta-client version.
  • Loading branch information
snf2ye authored Mar 4, 2024
1 parent e68b9fd commit 06b269b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies {
implementation 'bio.terra:terra-common-lib:0.1.9-SNAPSHOT'
// guava is depended on by terra-common-lib, https://broadworkbench.atlassian.net/browse/DC-798
implementation 'com.google.guava:guava:31.1-jre'
implementation 'bio.terra:datarepo-jakarta-client:1.563.0-SNAPSHOT'
implementation 'bio.terra:datarepo-client:2.13.0-SNAPSHOT'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public Map<String, StorageSystemInformation> getDatasets() {
EnumerateSnapshotModel response =
datarepoClient
.snapshotsApi()
.enumerateSnapshots(null, MAX_DATASETS, null, null, null, null, null, null);
.enumerateSnapshots(null, MAX_DATASETS, null, null, null, null, null, null, null);
Map<String, List<String>> roleMap = response.getRoleMap();

return response.getItems().stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ void getSnapshots() throws Exception {
new EnumerateSnapshotModel()
.items(List.of(new SnapshotSummaryModel().id(snapshotId).phsId("1234")))
.roleMap(items);
when(snapshotsApi.enumerateSnapshots(any(), any(), any(), any(), any(), any(), any(), any()))
when(snapshotsApi.enumerateSnapshots(
any(), any(), any(), any(), any(), any(), any(), any(), any()))
.thenReturn(esm);
var returnedItems = datarepoService.getDatasets();
assertThat(returnedItems, is(expectedItems));
Expand All @@ -99,7 +100,8 @@ void getSnapshot() throws Exception {
@Test
void getSnapshotsException() throws Exception {
mockSnapshots();
when(snapshotsApi.enumerateSnapshots(any(), any(), any(), any(), any(), any(), any(), any()))
when(snapshotsApi.enumerateSnapshots(
any(), any(), any(), any(), any(), any(), any(), any(), any()))
.thenThrow(new ApiException());
assertThrows(DatarepoException.class, () -> datarepoService.getDatasets());
}
Expand Down

0 comments on commit 06b269b

Please sign in to comment.