Skip to content

Commit

Permalink
Enable Azure and AWS acceptance test (#843)
Browse files Browse the repository at this point in the history
* Revert "Temporarily disable Azure and AWS AT (#841)"
This reverts commit 2af7f58.
* Update Azure acceptance test public key
  • Loading branch information
usmansaleem authored Jul 17, 2023
1 parent eefdd04 commit e35679f
Show file tree
Hide file tree
Showing 13 changed files with 3 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@
import org.apache.logging.log4j.Logger;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

@Disabled(value = "Temporary Disabled")
@EnabledIfEnvironmentVariable(
named = "RW_AWS_ACCESS_KEY_ID",
matches = ".*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@
import org.apache.logging.log4j.Logger;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

@Disabled(value = "Temporary Disabled")
@EnabledIfEnvironmentVariable(
named = "RW_AWS_ACCESS_KEY_ID",
matches = ".*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.apache.logging.log4j.Logger;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
Expand All @@ -48,7 +47,6 @@
NOTE: This AT attempts to create and load large number of keys from AWS Secrets Manager which may take several minutes,
hence it should only be manually run in dev/test environment instead of automatically via CI
*/
@Disabled(value = "Temporary Disabled")
@EnabledIfEnvironmentVariable(
named = "AWS_PERF_AT_ENABLED",
matches = "true",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@
import io.vertx.core.json.JsonObject;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

@Disabled(value = "Temporary Disabled")
public class AzureKeyVaultAcceptanceTest extends AcceptanceTestBase {

private static final String CLIENT_ID = System.getenv("AZURE_CLIENT_ID");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@
import org.apache.tuweni.bytes.Bytes32;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;

@Disabled(value = "Temporary Disabled")
@EnabledIfEnvironmentVariable(
named = "AZURE_CLIENT_ID",
matches = ".*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@
import io.restassured.response.Response;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;

@Disabled(value = "Temporary Disabled")
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@EnabledIfEnvironmentVariable(
named = "RW_AWS_ACCESS_KEY_ID",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.apache.commons.lang3.ArrayUtils;
import org.apache.tuweni.bytes.Bytes32;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariables;
Expand Down Expand Up @@ -207,7 +206,6 @@ public void allLoadedKeysAreReturnedPublicKeyResponseWithEmptyAccept(final KeyTy
validateApiResponse(response, containsInAnyOrder(keys));
}

@Disabled(value = "Temporary Disabled")
@Test
@EnabledIfEnvironmentVariables({
@EnabledIfEnvironmentVariable(named = "AZURE_CLIENT_ID", matches = ".*"),
Expand All @@ -221,7 +219,7 @@ public void azureKeysReturnAppropriatePublicKey() {
final String keyVaultName = System.getenv("AZURE_KEY_VAULT_NAME");
final String tenantId = System.getenv("AZURE_TENANT_ID");
final String publicKeyHexString =
"964f00253459f1f43c7a7720a0db09a328d4ee6f18838015023135d7fc921f1448de34d05de7a1f72a7b5c9f6c76931d7ab33d0f0846ccce5452063bd20f5809";
"0xa95663509e608da3c2af5a48eb4315321f8430cbed5518a44590cc9d367f01dc72ebbc583fc7d94f9fdc20eb6e162c9f8cb35be8a91a3b1d32a63ecc10be4e08";

METADATA_FILE_HELPERS.createAzureKeyYamlFileAt(
testDirectory.resolve(publicKeyHexString + ".yaml"),
Expand All @@ -231,7 +229,7 @@ public void azureKeysReturnAppropriatePublicKey() {
tenantId);
initAndStartSigner("eth1");
final Response response = callApiPublicKeysWithoutOpenApiClientSideFilter(SECP256K1);
validateApiResponse(response, containsInAnyOrder("0x" + publicKeyHexString));
validateApiResponse(response, containsInAnyOrder(publicKeyHexString));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
import io.vertx.core.json.JsonObject;
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariables;
Expand Down Expand Up @@ -155,7 +154,6 @@ public void ableToSignUsingHashicorpWithHttpProtocolOverride(
}
}

@Disabled(value = "Temporary Disabled")
@Test
@EnabledIfEnvironmentVariables({
@EnabledIfEnvironmentVariable(named = "AZURE_CLIENT_ID", matches = ".*"),
Expand All @@ -178,7 +176,6 @@ public void ableToSignUsingAzure() throws JsonProcessingException {
signAndVerifySignature(ArtifactType.BLOCK);
}

@Disabled(value = "Temporary Disabled")
@Test
@EnabledIfEnvironmentVariables({
@EnabledIfEnvironmentVariable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import com.google.common.io.Resources;
import io.restassured.response.Response;
import org.apache.tuweni.bytes.Bytes;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariables;
Expand All @@ -53,7 +52,7 @@ public class SecpSigningAcceptanceTest extends SigningAcceptanceTestBase {
public static final String PUBLIC_KEY_HEX_STRING =
"09b02f8a5fddd222ade4ea4528faefc399623af3f736be3c44f03e2df22fb792f3931a4d9573d333ca74343305762a753388c3422a86d98b713fc91c1ea04842";
public static final String AZURE_PUBLIC_KEY_HEX_STRING =
"964f00253459f1f43c7a7720a0db09a328d4ee6f18838015023135d7fc921f1448de34d05de7a1f72a7b5c9f6c76931d7ab33d0f0846ccce5452063bd20f5809";
"a95663509e608da3c2af5a48eb4315321f8430cbed5518a44590cc9d367f01dc72ebbc583fc7d94f9fdc20eb6e162c9f8cb35be8a91a3b1d32a63ecc10be4e08";

private static final MetadataFileHelpers METADATA_FILE_HELPERS = new MetadataFileHelpers();

Expand Down Expand Up @@ -93,7 +92,6 @@ public void signDataWithKeyFromHashicorp() {
}
}

@Disabled(value = "Temporary Disabled")
@Test
@EnabledIfEnvironmentVariables({
@EnabledIfEnvironmentVariable(named = "AZURE_CLIENT_ID", matches = ".*"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;

@Disabled(value = "Temporary disabled")
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@EnabledIfEnvironmentVariable(
named = "RW_AWS_ACCESS_KEY_ID",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
Expand All @@ -49,7 +48,6 @@
import software.amazon.awssdk.services.secretsmanager.model.UntagResourceRequest;
import software.amazon.awssdk.services.secretsmanager.model.UpdateSecretRequest;

@Disabled(value = "Temporary Disabled")
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@EnabledIfEnvironmentVariable(
named = "RW_AWS_ACCESS_KEY_ID",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

@Disabled(value = "Temporary Disabled")
public class AzureKeyVaultTest {
private static final String CLIENT_ID = System.getenv("AZURE_CLIENT_ID");
private static final String CLIENT_SECRET = System.getenv("AZURE_CLIENT_SECRET");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.web3j.crypto.Hash;
import org.web3j.crypto.Sign;
import org.web3j.crypto.Sign.SignatureData;
import org.web3j.utils.Numeric;

@Disabled(value = "Temporary Disabled")
public class AzureKeyVaultSignerTest {
private static final String clientId = System.getenv("AZURE_CLIENT_ID");
private static final String clientSecret = System.getenv("AZURE_CLIENT_SECRET");
Expand Down

0 comments on commit e35679f

Please sign in to comment.