Conversation
|
Can one of the admins verify this patch? |
|
|
||
| private static String getLiveVaultUri1() { | ||
| return getenvOrDefault("keyvault.vaulturi", "https://javasdktestvault.vault.azure.net"); | ||
| return getenvOrDefault("KEYVAULT_VAULTURI", "https://javasdktestvault.vault.azure.net"); |
There was a problem hiding this comment.
Out of curiosity - what motivated the changing of all key names to uppercase with underscores rather that periods?
There was a problem hiding this comment.
Looks like periods are not processed correctly on linux system, and VSTS converts them to underscore, and converts environment variable names to uppercase anyway. Please see https://developercommunity.visualstudio.com/content/problem/328064/vsts-silently-converts-variable-names-to-uppercase.html for uppercase and https://stackoverflow.com/questions/50020314/escaping-environment-variable-names-in-vsts for underscores.
| byte[] EK = { (byte) 0x96, 0x77, (byte) 0x8B, 0x25, (byte) 0xAE, 0x6C, (byte) 0xA4, 0x35, (byte) 0xF9, 0x2B, 0x5B, (byte) 0x97, (byte) 0xC0, 0x50, (byte) 0xAE, (byte) 0xD2, 0x46, (byte) 0x8A, (byte) 0xB8, (byte) 0xA1, 0x7A, (byte) 0xD8, 0x4E, 0x5D }; | ||
|
|
||
| String TEST_SECRET_NAME = SECRET_NAME + "1"; | ||
| String TEST_SECRET_NAME = SECRET_NAME + "4"; |
There was a problem hiding this comment.
It always makes me a little nervous when I see magic numbers being changed in unit tests. Why is this required?
There was a problem hiding this comment.
Tests involve creating and deleting secrets.
Multiple Tests using same magic number for the secret name conflicts when a test is trying to create a secret and the previous Test requested a deletion. And the deletion is still in queue.
To avoid this conflict, changed the magic number for the test.
| * Sample method. | ||
| * @return message | ||
| */ | ||
| public final String getMessage() { | ||
| return "hello"; | ||
| } | ||
| } |
There was a problem hiding this comment.
This, and the package-info.java below, are unrelated changes, aren't they?
There was a problem hiding this comment.
They both caused checkstyle and because of that the build fail.
| @@ -2,32 +2,20 @@ trigger: | |||
| - master | |||
|
|
|||
| jobs: | |||
There was a problem hiding this comment.
Looks like you have some merge conflicts to handle which should get this file updated to what is currently committed in the repo. As it stands you are reverting some changes that were committed because your branch is behind master.
| mvn test -Dsurefire.rerunFailingTestsCount=3 $LOG_PARAMS -Dparallel=classes -DthreadCount=3 -DforkCount=1C -f pom.client.build.xml | ||
| displayName: 'Bash Script' | ||
| env: | ||
| ARM_CLIENTID: $(ARM_CLIENTID) |
There was a problem hiding this comment.
Are these 2 env variables the only difference between live vs not live?
There was a problem hiding this comment.
There are more Variables defined in the variables tab of dev ops pipeline.
# Conflicts: # .azure-pipelines/client.test.yml # .azure-pipelines/client.yml # keyvault/data-plane/azure-keyvault/src/test/java/com/microsoft/azure/keyvault/test/AsyncOperationsTest.java # keyvault/data-plane/azure-keyvault/src/test/java/com/microsoft/azure/keyvault/test/SecretOperationsTest.java # keyvault/data-plane/pom.xml
| - name: ARM_CLIENTKEY | ||
| value: $(java-keyvault-test-arm-client-key) | ||
|
|
||
| resources: |
There was a problem hiding this comment.
Why do you need "resources: self"?
There was a problem hiding this comment.
Not needed actually,
removed.
| - bash: | | ||
| LOG_PARAMS='-Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' | ||
| mvn test -Dhttp.keepAlive=false -Dsurefire.rerunFailingTestsCount=3 $LOG_PARAMS -f pom.client.build.xml | ||
| displayName: 'Bash Script' |
There was a problem hiding this comment.
Please update this to represent what it is doing, like "Running Live Tests"
| queue: | ||
| name: Hosted VS2017 | ||
| steps: | ||
| - bash: | |
There was a problem hiding this comment.
Is there a reason you aren't using the Maven@3 task to run the tests similar to https://github.com/Azure/azure-sdk-for-java/blob/master/.azure-pipelines/client.test.yml#L17?
In general we should try to do that to help be consistent and also that allows us to capture the test results into the test tab of the build which gives us a good view of the tests than ran and a history of them.
There was a problem hiding this comment.
The environment variables were not read during the build when tried to configure as Maven task.
keyvault/data-plane/pom.xml
Outdated
| <name>KEYVAULT_VAULTURI</name> | ||
| <value>https://tifchen-keyvault-fancy.vault.azure.net</value> | ||
| <name>KEYVAULT_VAULTURI</name> | ||
| <value>https://azure-keyvault-3.vault.azure.net</value> |
There was a problem hiding this comment.
Looks like you are setting these in 3 places. One is here, one is below and one in the build definition. Do they need to be set in all these places?
There was a problem hiding this comment.
Updated, the values should only be in environment variables section of pom.
Removed from other places.
| @@ -325,8 +312,8 @@ | |||
| </includes> | |||
| <environmentVariables> | |||
| <test.mode>${testMode}</test.mode> | |||
| <KEYVAULT_VAULTURI>https://tifchen-keyvault-fancy.vault.azure.net</KEYVAULT_VAULTURI> | |||
| <KEYVAULT_VAULTURI_ALT>https://tifchen-keyvault-fancier.vault.azure.net</KEYVAULT_VAULTURI_ALT> | |||
| <KEYVAULT_VAULTURI>https://azure-keyvault-3.vault.azure.net</KEYVAULT_VAULTURI> | |||
There was a problem hiding this comment.
What about here? Should we also remove these?
There was a problem hiding this comment.
I see you removed them from the YAML instead so there is no duplication.
Contains changes for Azure Key Vault Live Tests.