Skip to content

Commit 49da37e

Browse files
committed
Small changes
1 parent dc47d80 commit 49da37e

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

Diff for: validator/client/src/main/java/tech/pegasys/teku/validator/client/restapi/apis/GetGraffiti.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public GetGraffiti(final KeyManager keyManager) {
6363
.response(SC_OK, "Success response", RESPONSE_TYPE)
6464
.withAuthenticationResponses()
6565
.withNotFoundResponse()
66-
.withNotImplementedResponse()
6766
.build());
6867
this.keyManager = keyManager;
6968
}
@@ -78,7 +77,8 @@ public void handleRequest(RestApiRequest request) throws JsonProcessingException
7877
return;
7978
}
8079

81-
String graffiti = maybeValidator.get().getGraffiti().map(this::processGraffitiBytes).orElse("");
80+
final String graffiti =
81+
maybeValidator.get().getGraffiti().map(this::processGraffitiBytes).orElse("");
8282
request.respondOk(new GraffitiResponse(publicKey, graffiti));
8383
}
8484

Diff for: validator/client/src/test/java/tech/pegasys/teku/validator/client/restapi/apis/GetGraffitiTest.java

+3-8
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import static tech.pegasys.teku.infrastructure.http.HttpStatusCodes.SC_FORBIDDEN;
2323
import static tech.pegasys.teku.infrastructure.http.HttpStatusCodes.SC_INTERNAL_SERVER_ERROR;
2424
import static tech.pegasys.teku.infrastructure.http.HttpStatusCodes.SC_NOT_FOUND;
25-
import static tech.pegasys.teku.infrastructure.http.HttpStatusCodes.SC_NOT_IMPLEMENTED;
2625
import static tech.pegasys.teku.infrastructure.http.HttpStatusCodes.SC_OK;
2726
import static tech.pegasys.teku.infrastructure.http.HttpStatusCodes.SC_UNAUTHORIZED;
2827
import static tech.pegasys.teku.infrastructure.restapi.MetadataTestUtil.getResponseStringFromMetadata;
@@ -69,7 +68,7 @@ void shouldGetGraffiti() throws JsonProcessingException {
6968

7069
handler.handleRequest(request);
7170

72-
GetGraffiti.GraffitiResponse expectedResponse =
71+
final GetGraffiti.GraffitiResponse expectedResponse =
7372
new GetGraffiti.GraffitiResponse(publicKey, stringGraffiti);
7473
assertThat(request.getResponseCode()).isEqualTo(SC_OK);
7574
assertThat(request.getResponseBody()).isEqualTo(expectedResponse);
@@ -89,7 +88,8 @@ void shouldGetEmptyGraffiti() throws JsonProcessingException {
8988

9089
handler.handleRequest(request);
9190

92-
GetGraffiti.GraffitiResponse expectedResponse = new GetGraffiti.GraffitiResponse(publicKey, "");
91+
final GetGraffiti.GraffitiResponse expectedResponse =
92+
new GetGraffiti.GraffitiResponse(publicKey, "");
9393
assertThat(request.getResponseCode()).isEqualTo(SC_OK);
9494
assertThat(request.getResponseBody()).isEqualTo(expectedResponse);
9595
}
@@ -141,9 +141,4 @@ void metadata_shouldHandle403() throws JsonProcessingException {
141141
void metadata_shouldHandle500() throws JsonProcessingException {
142142
verifyMetadataErrorResponse(handler, SC_INTERNAL_SERVER_ERROR);
143143
}
144-
145-
@Test
146-
void metadata_shouldHandle501() throws JsonProcessingException {
147-
verifyMetadataErrorResponse(handler, SC_NOT_IMPLEMENTED);
148-
}
149144
}

0 commit comments

Comments
 (0)