fix Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format (#701)

This commit is contained in:
Nikita Konev
2020-03-30 00:11:20 +03:00
committed by GitHub
parent 1ddb18bfd0
commit 333779070f
2 changed files with 3 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
* @author Spencer Gibb
*/
@SuppressWarnings("unchecked")
@Endpoint(id = "service-registry")
@Endpoint(id = "serviceregistry")
public class ServiceRegistryEndpoint {
private final ServiceRegistry serviceRegistry;

View File

@@ -71,14 +71,14 @@ public class ServiceRegistryEndpointTests {
@Test
public void testGet() throws Exception {
this.mvc.perform(get(BASE_PATH + "/service-registry")).andExpect(status().isOk())
this.mvc.perform(get(BASE_PATH + "/serviceregistry")).andExpect(status().isOk())
.andExpect(content().string(containsString(MYSTATUS)));
}
@Test
public void testPost() throws Exception {
Map<String, String> status = Collections.singletonMap("status", UPDATED_STATUS);
this.mvc.perform(post(BASE_PATH + "/service-registry")
this.mvc.perform(post(BASE_PATH + "/serviceregistry")
.content(new ObjectMapper().writeValueAsString(status))
.contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk());
then(this.serviceRegistry.getUpdatedStatus().get()).isEqualTo(UPDATED_STATUS);