Skip to content

Commit

Permalink
Updated missed changes from main-3.
Browse files Browse the repository at this point in the history
  • Loading branch information
corneil committed Aug 23, 2024
1 parent 5e7fa1b commit 0aafc8c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,27 +317,19 @@ void registerAllFromFile() throws Exception {
@Test
void registerAllWithoutForce() throws Exception {
this.appRegistryService.importAll(false, new ClassPathResource("META-INF/test-apps-overwrite.properties"));
assertThat(this.appRegistryService.find("time", ApplicationType.source).getUri().toString())
.isEqualTo("maven://org" + ".springframework.cloud.stream.app:time-source-rabbit:5.0.0");
assertThat(this.appRegistryService.find("filter", ApplicationType.processor).getUri().toString())
.isEqualTo("maven://org" + ".springframework.cloud.stream.app:filter-processor-rabbit:5.0.0");
assertThat(this.appRegistryService.find("log", ApplicationType.sink).getUri().toString())
.isEqualTo("maven://org.springframework" + ".cloud.stream.app:log-sink-rabbit:5.0.0");
assertThat(this.appRegistryService.find("timestamp", ApplicationType.task).getUri().toString())
.isEqualTo("maven://org" + ".springframework.cloud.task.app:timestamp-task:5.0.0");
assertThat(this.appRegistryService.find("time", ApplicationType.source).getUri()).hasToString("maven://org" + ".springframework.cloud.stream.app:time-source-rabbit:5.0.0");
assertThat(this.appRegistryService.find("filter", ApplicationType.processor).getUri()).hasToString("maven://org" + ".springframework.cloud.stream.app:filter-processor-rabbit:5.0.0");
assertThat(this.appRegistryService.find("log", ApplicationType.sink).getUri()).hasToString("maven://org.springframework" + ".cloud.stream.app:log-sink-rabbit:5.0.0");
assertThat(this.appRegistryService.find("timestamp", ApplicationType.task).getUri()).hasToString("maven://org" + ".springframework.cloud.task.app:timestamp-task:5.0.0");
}

@Test
void registerAllWithForce() throws Exception {
this.appRegistryService.importAll(true, new ClassPathResource("META-INF/test-apps-overwrite.properties"));
assertThat(this.appRegistryService.find("time", ApplicationType.source).getUri().toString())
.isEqualTo("maven://org" + ".springframework.cloud.stream.app:time-source-kafka:5.0.0");
assertThat(this.appRegistryService.find("filter", ApplicationType.processor).getUri().toString())
.isEqualTo("maven://org" + ".springframework.cloud.stream.app:filter-processor-kafka:5.0.0");
assertThat(this.appRegistryService.find("log", ApplicationType.sink).getUri().toString())
.isEqualTo("maven://org.springframework" + ".cloud.stream.app:log-sink-kafka:5.0.0");
assertThat(this.appRegistryService.find("timestamp", ApplicationType.task).getUri().toString())
.isEqualTo("maven://org" + ".springframework.cloud.task.app:timestamp-overwrite-task:5.0.0");
assertThat(this.appRegistryService.find("time", ApplicationType.source).getUri()).hasToString("maven://org" + ".springframework.cloud.stream.app:time-source-kafka:5.0.0");
assertThat(this.appRegistryService.find("filter", ApplicationType.processor).getUri()).hasToString("maven://org" + ".springframework.cloud.stream.app:filter-processor-kafka:5.0.0");
assertThat(this.appRegistryService.find("log", ApplicationType.sink).getUri()).hasToString("maven://org.springframework" + ".cloud.stream.app:log-sink-kafka:5.0.0");
assertThat(this.appRegistryService.find("timestamp", ApplicationType.task).getUri()).hasToString("maven://org" + ".springframework.cloud.task.app:timestamp-overwrite-task:5.0.0");
}

@Test
Expand Down Expand Up @@ -730,10 +722,12 @@ void listApplicationsByVersion() throws Exception {

@Test
void listApplicationsByVersionAndSearch() throws Exception {
mockMvc.perform(get("/apps?version=5.0.0&search=time").accept(MediaType.APPLICATION_JSON)).andDo(print())
mockMvc.perform(get("/apps?version=5.0.0&search=time").accept(MediaType.APPLICATION_JSON))
.andDo(print())
.andExpect(status().isOk())
.andExpect(jsonPath("_embedded.appRegistrationResourceList", hasSize(2)));
mockMvc.perform(get("/apps?version=5.0.0&search=timestamp").accept(MediaType.APPLICATION_JSON)).andDo(print())
mockMvc.perform(get("/apps?version=5.0.0&search=timestamp").accept(MediaType.APPLICATION_JSON))
.andDo(print())
.andExpect(status().isOk())
.andExpect(jsonPath("_embedded.appRegistrationResourceList", hasSize(1)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ void streamWithShortformProperties() throws Exception {

SpringCloudDeployerApplicationSpec logSpec = parseSpec(logPackage.getConfigValues().getRaw());

assertThat(logSpec.getApplicationProperties()).containsEntry("log.level", "WARN");
assertThat(logSpec.getApplicationProperties()).containsEntry("log.consumer.level", "WARN");
assertThat(logSpec.getApplicationProperties().get("level")).isNull();

SpringCloudDeployerApplicationSpec timeSpec = parseSpec(timePackage.getConfigValues().getRaw());
Expand Down Expand Up @@ -1029,7 +1029,7 @@ void deployWithAppPropertiesOverrideWithLabel() throws Exception {
logger.info("log:applicationProperties={}", logSpec.getApplicationProperties());
logger.info("log:deploymentProperties={}", logSpec.getDeploymentProperties());

assertThat(logSpec.getApplicationProperties()).containsEntry("log.level", "ERROR");
assertThat(logSpec.getApplicationProperties()).containsEntry("log.consumer.level", "ERROR");

SpringCloudDeployerApplicationSpec timeSpec = parseSpec(timePackage.getConfigValues().getRaw());
logger.info("time:applicationProperties={}", timeSpec.getApplicationProperties());
Expand Down

0 comments on commit 0aafc8c

Please sign in to comment.