You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jcorioland
There is an issue when the code generates the connection to the public ip.
In the following line, it tries to connect to the public ip address:
After several days of troubleshooting the code, I found that it fails because the variable not only contains the ip address, but it also includes double quotes around the ip address, this makes it fail.
cd /c/git/terraform/samples/end-to-end-testing/src/test
az login --use-device-code
az account set --subscription Playground
cd ~/.ssh
ssh-keygen.exe #This is in test, not definitive yet: -m PEM
make sure id_rsa and id_rsa.pub were created
ls -l /.ssh/id_rsa*
export TEST_SSH_KEY_PATH="/.ssh/id_rsa"
cd /c/git/terraform/samples/end-to-end-testing/src/test
go mod download github.com/gruntwork-io/terratest
go mod download github.com/Azure/go-autorest/autorest
go mod tidy -e
go test -v ./ -timeout 10m
Anything else?
No response
The text was updated successfully, but these errors were encountered:
heriberto-mb
changed the title
Issue found in end-to-end-testing
Solved: Issue found in end-to-end-testing golang error: dial tcp: lookup "<ip>": no such host
Apr 18, 2023
Is there an existing issue for this?
Example Name
https://github.com/Azure/terraform/blob/master/samples/end-to-end-testing/src/test/end2end_test.go#L78
Terraform Version
1.3.8
Current Behavior
@jcorioland
There is an issue when the code generates the connection to the public ip.
In the following line, it tries to connect to the public ip address:
https://github.com/Azure/terraform/blob/master/samples/end-to-end-testing/src/test/end2end_test.go#L78
After several days of troubleshooting the code, I found that it fails because the variable not only contains the ip address, but it also includes double quotes around the ip address, this makes it fail.
Expected Behavior
Finally fixed it by using the following change:
Once that adjustment was done, the code worked!
Steps To Reproduce
cd /c/git/terraform/samples/end-to-end-testing/src/test
az login --use-device-code
az account set --subscription Playground
cd ~/.ssh
ssh-keygen.exe #This is in test, not definitive yet: -m PEM
make sure id_rsa and id_rsa.pub were created
ls -l
/.ssh/id_rsa*/.ssh/id_rsa"export TEST_SSH_KEY_PATH="
cd /c/git/terraform/samples/end-to-end-testing/src/test
go mod download github.com/gruntwork-io/terratest
go mod download github.com/Azure/go-autorest/autorest
go mod tidy -e
go test -v ./ -timeout 10m
Anything else?
No response
The text was updated successfully, but these errors were encountered: