Fix tests

Setting the log file name to a random value in smoke tests
doesn't work because the logger context has already been initialized.
This commit is contained in:
Madhura Bhave
2019-07-10 18:14:58 -07:00
parent 773dda3d55
commit aebb60d8b8
3 changed files with 24 additions and 13 deletions

View File

@@ -66,13 +66,6 @@ public class EndpointsPropertiesSampleActuatorApplicationTests {
assertThat(entity.getBody()).contains("\"hello\":\"world\"");
}
@Test
public void logfileWithRandomName() {
ResponseEntity<String> entity = this.restTemplate.withBasicAuth("user", getPassword())
.getForEntity("/admin/logfile", String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
}
private String getPassword() {
return "password";
}

View File

@@ -1,5 +1,3 @@
server.error.path: /oops
management.endpoint.health.show-details: always
management.endpoints.web.base-path: /admin
logging.file=./target/${spring.application.instance_id}.log
spring.application.instance_id=${random.value}
server.error.path:/oops
management.endpoint.health.show-details:always
management.endpoints.web.base-path:/admin