-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automate Cloudshell testing #795
Comments
@AlexGhiondea - can you please help get this to the Vendor team @kurtzeborn - can you please include this on the EngSys backlog as a template for future integration into devOps (for all languages) |
Java: Initial setup
Run the test:
mvn clean install -Dgpg.skip -DskipTests -f common/perf-test-core/pom.xml
mvn clean install -Dgpg.skip -DskipTests -f eng/code-quality-reports/pom.xml
mvn clean install -Dgpg.skip -DskipTests -f sdk/core/azure-core/pom.xml
mvn clean install -Dgpg.skip -DskipTests -f sdk/core/azure-core-http-netty/pom.xml
mvn clean install -Dgpg.skip -DskipTests -f sdk/identity/azure-identity/pom.xml
mvn clean install -Dgpg.skip -DskipTests -f sdk/keyvault/pom.xml
mvn test -Dtest=ManagedIdentityCredentialLiveTest#testMSIEndpointWithSystemAssigned* -f sdk/e2e/pom.xml -Dgpg.skip -am -DfailIfNoTests=false Expected output:
|
Python instructions are here. |
Hi @jianghaolu , I am following above steps to do java E2E test. My suggestion as below. Please correct me if I miss anything. 1.Commands with .skip fails with below error. So we need to inclose Dgpg.skip with quotation marks. |
Hi @catalinaperalta , I am following above steps to do Go E2E test. My suggestion as below. Please correct me if I miss anything. 1.Test fails when running last command "go test". I tried to specify the test name by running Did you miss specifying the test case name? If it is by design, could you please add more detials to guide to resolve this error? |
@XuGuang-Yao I believe on some shells the symbol "." needs to be escaped like "." or "`.". You may be running on such a terminal. I did not test it in PowerShell as most of our customers run this in CMD or Bash. |
For JavaScript: Testing azure-identity in Azure Cloud ShellOpen Azure Cloud ShellCreate an Azure Key Vaultset environment variables to simplify copy-pasting
create a resource groupaz group create -n $RESOURCE_GROUP --location westus2 create the Key Vaultaz keyvault create -g $RESOURCE_GROUP -n $KEY_VAULT_NAME --sku standard Run the tests (from inside Cloudshell)Build the webapp
Install the requirements:
Build the job:
Run testThe tests expect the vault's URI in an environment variable. Replace export KEY_VAULT_NAME=<put key vault name here> node index Deactivatedeactivate Verify success
Delete Azure resourcesAfter running tests, delete the resources provisioned earlier: az group delete -n $RESOURCE_GROUP -y --no-wait |
Hi @jonathandturner, I am following above steps to do JS E2E test. My suggestion as below. Please correct me if I miss anything. Bolow error occurred after running command |
Yes, all of these issues seem to be related to keytar. We'll have to figure out what is happening there. These steps largely worked before we added it but it may mean there are additional steps we need to take now that we've added keytar. |
@XuGuang-Yao Yes you are correct to include the test name when running this test. Thanks for catching that, I've also updated the instructions to include that. |
@jonathandturner - we are following the step of E2E Javascript test. And then, it return an error(Permission denied) when we try to fix it by execute the command |
Hi @jianghaolu, I am following above steps to do java E2E test. Bolow error occurred after running command
The plugin |
@g2vinay for Java SDK issues |
Hi @jntrnr, I am following above steps to do JavaScript E2E test. Bolow error occurred after running command |
Hi @catalinaperalta, @chlowell follow the above steps to test for go. When run command Through investigation, after clone the code, switch to For Azure Cloudshell testing, can we refer to Azure Arc testing to update testing instructions? |
Will take a look. @v-jiaodi is this a clean VM? Do you have a link to a pipeline run? |
Hi @catalinaperalta, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support. |
@joshfree This issue has been closed. Do we need to continue testing this |
We need to automate the way we run tests. The steps to run tests in CloudShell for the identity component are as follows:
Initial Setup:
PLEASE NOTE: This setup is Go specific since CloudShell is running an older version of Go by default and we need to include the current version that has module support. Other languages will have a different set up.
Also, if running CloudShell with a linked storage account steps 1-4 only need to be done the first time this test is run. Step 5 still needs to be run since the environment variables are not persisted every session.
Run this command: wget https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz
Run this command: tar -xvf go1.13.1.linux-amd64.tar.gz
Run the following commands in order:
$env:GOROOT="$HOME/go"
$env:GOPATH=$HOME
$env:PATH="$env:GOPATH/bin:$env:GOROOT/bin:$env:PATH"
Run this command: go version
Expected output: go version go1.13.1 linux/amd64
Run the test:
Run this command: git clone https://github.com/Azure/azure-sdk-for-go.git
Run this command: cd azure-sdk-for-go/sdk/azidentity
Run this command: go test -run TestManagedIdentityCredential_GetTokenInCloudShellLive
Expected output: PASS
The text was updated successfully, but these errors were encountered: