Skip to content

Commit a1f48ab

Browse files
committed
Use NoOpSigner instead of mock
1 parent 743a836 commit a1f48ab

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import static tech.pegasys.teku.infrastructure.http.HttpStatusCodes.SC_UNAUTHORIZED;
2727
import static tech.pegasys.teku.infrastructure.restapi.MetadataTestUtil.getResponseStringFromMetadata;
2828
import static tech.pegasys.teku.infrastructure.restapi.MetadataTestUtil.verifyMetadataErrorResponse;
29+
import static tech.pegasys.teku.spec.generator.signatures.NoOpLocalSigner.NO_OP_SIGNER;
2930

3031
import com.fasterxml.jackson.core.JsonProcessingException;
3132
import java.io.IOException;
@@ -36,7 +37,6 @@
3637
import tech.pegasys.teku.infrastructure.http.HttpErrorResponse;
3738
import tech.pegasys.teku.infrastructure.restapi.StubRestApiRequest;
3839
import tech.pegasys.teku.spec.TestSpecFactory;
39-
import tech.pegasys.teku.spec.signatures.Signer;
4040
import tech.pegasys.teku.spec.util.DataStructureUtil;
4141
import tech.pegasys.teku.validator.api.Bytes32Parser;
4242
import tech.pegasys.teku.validator.client.OwnedKeyManager;
@@ -62,8 +62,7 @@ void shouldGetGraffiti() throws JsonProcessingException {
6262
.pathParameter("pubkey", publicKey.toHexString())
6363
.build();
6464

65-
final Validator validator =
66-
new Validator(publicKey, mock(Signer.class), () -> Optional.of(graffiti));
65+
final Validator validator = new Validator(publicKey, NO_OP_SIGNER, () -> Optional.of(graffiti));
6766
when(keyManager.getValidatorByPublicKey(eq(publicKey))).thenReturn(Optional.of(validator));
6867

6968
handler.handleRequest(request);
@@ -83,7 +82,7 @@ void shouldGetEmptyGraffiti() throws JsonProcessingException {
8382
.pathParameter("pubkey", publicKey.toHexString())
8483
.build();
8584

86-
final Validator validator = new Validator(publicKey, mock(Signer.class), Optional::empty);
85+
final Validator validator = new Validator(publicKey, NO_OP_SIGNER, Optional::empty);
8786
when(keyManager.getValidatorByPublicKey(eq(publicKey))).thenReturn(Optional.of(validator));
8887

8988
handler.handleRequest(request);

0 commit comments

Comments
 (0)