use of com.thoughtworks.go.addon.businesscontinuity.ConfigFileType in project gocd by gocd.
the class PrimaryStatusProviderControllerTest method shouldNotIncludeFileWithEmptyMd5InLatestStatus.
@Test
void shouldNotIncludeFileWithEmptyMd5InLatestStatus() throws Exception {
Map<ConfigFileType, String> latestStatus = new HashMap<>();
latestStatus.put(ConfigFileType.CRUISE_CONFIG_XML, "a");
latestStatus.put(ConfigFileType.USER_FEATURE_TOGGLE, "");
when(goFilesStatusProvider.getLatestStatusMap()).thenReturn(latestStatus);
primaryStatusProviderController.latestStatus(httpServletResponse);
ServerStatusResponse serverStatusResponse = new Gson().fromJson(httpServletResponse.getContentAsString(), ServerStatusResponse.class);
assertThat(serverStatusResponse.getFileDetailsMap().containsKey(ConfigFileType.USER_FEATURE_TOGGLE), is(false));
}
Aggregations