Skip to content

Commit

Permalink
Add more coverage to impl
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <dxho@amazon.com>
  • Loading branch information
derek-ho committed Oct 13, 2023
1 parent af4c924 commit 970b5bf
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,19 @@ void testUpdateDefaultDataSource() {
unsupportedOperationException.getMessage());
}

@Test
void testPatchDefaultDataSource() {
Map<String, Object> dataSourceData =
Map.of(NAME_FIELD, DEFAULT_DATASOURCE_NAME, DESCRIPTION_FIELD, "test");
UnsupportedOperationException unsupportedOperationException =
assertThrows(
UnsupportedOperationException.class,
() -> dataSourceService.patchDataSource(dataSourceData));
assertEquals(
"Not allowed to update default datasource :" + DEFAULT_DATASOURCE_NAME,
unsupportedOperationException.getMessage());
}

@Test
void testPatchDataSourceSuccessCase() {
// Tests that patch underlying implementation is to call update
Expand Down

0 comments on commit 970b5bf

Please sign in to comment.