Comments (10)
What code are you running? The http_helper
will use whatever URL you pass in... And I'm noticing the URL is https
, so are you setting that to https intentionally? The examples in the book all use http.
from terraform-up-and-running-code.
Fixed in #58.
from terraform-up-and-running-code.
Ah, you must've ended up with a newer version of Terratest. The newer one now takes in a *tls.Config
argument after the URL. You can either fix it by setting that argument to nil
(which should be fine since we're making HTTP requests in this test, not HTTPS) or downgrading to an older Terratest version.
from terraform-up-and-running-code.
Hi I have updated the tls.Config to nil, but i got this error instead.
TestAlbExample 2020-04-07T12:18:22+08:00 retry.go:72: HTTP GET to URL https://terraform-up-and-running-669391245.us-east-2.elb.amazonaws.com
TestAlbExample 2020-04-07T12:18:22+08:00 http_helper.go:27: Making an HTTP GET call to URL https://terraform-up-and-running-669391245.us-east-2.elb.amazonaws.com
TestAlbExample 2020-04-07T12:18:32+08:00 retry.go:84: HTTP GET to URL https://terraform-up-and-running-669391245.us-east-2.elb.amazonaws.com returned an error: Get "https://terraform-up-and-running-669391245.us-east-2.elb.amazonaws.com": dial tcp 3.22.108.33:443: i/o timeout (Client.Timeout exceeded while awaiting headers). Sleeping for 20s and will try again.
looks like something to do with the tls?
from terraform-up-and-running-code.
my mistake.. typo there. thanks for pointing that out.
from terraform-up-and-running-code.
different but somehow related, but in the next test case for dependency injection, the test kept failing with :-
`TestHelloWorldAppExample 2020-04-07T18:52:43+08:00 retry.go:72: HTTP GET to URL http://hello-world-test-MZnpP5-1676154927.us-east-2.elb.amazonaws.com
TestHelloWorldAppExample 2020-04-07T18:52:43+08:00 http_helper.go:32: Making an HTTP GET call to URL http://hello-world-test-MZnpP5-1676154927.us-east-2.elb.amazonaws.com
TestHelloWorldAppExample 2020-04-07T18:52:44+08:00 retry.go:84: HTTP GET to URL http://hello-world-test-MZnpP5-1676154927.us-east-2.elb.amazonaws.com returned an error: Validation failed for URL http://hello-world-test-MZnpP5-1676154927.us-east-2.elb.amazonaws.com. Response status: 200. Response body:
Hello, World
DB address: mock-value-for-test
DB port: 3306
. Sleeping for 10s and will try again. `Am I supposed to change anything, i.e. the mock DB address?
from terraform-up-and-running-code.
Which test is this? What chapter/section?
from terraform-up-and-running-code.
Chapter 7, Dependency Injection Test Codes, Pg 243 onwards
from terraform-up-and-running-code.
Oh, you're right, that is a bug! The test is looking for the response body to be exactly "Hello, World" (see here), but instead, it should be looking for the body to contain "Hello, World". Not sure how that slipped by. I'll fix it this weekend.
from terraform-up-and-running-code.
thanks for the fix
from terraform-up-and-running-code.
Related Issues (20)
- EC2 instance not responding on port 8080 HOT 3
- Issue with code update for EC2 HOT 3
- Terraform Up and Running, 3rd Edition, Chapter 4, Modularizing MySQL HOT 3
- Chapter 3: How to Manage Terraform State
- Ch7: K8s example doesn't start HOT 1
- failed to lock s3 state: 2 errors occurred:
- Looking for an full example
- Chapter 3 - Isolation Via Workspaces HOT 1
- Chapter 3 HOT 3
- Chapter 3: webserver-cluster ALB unable to access
- unit tests fail in chapter 7 HOT 5
- Why this web server cluster definition doesn't have backend configuration? HOT 2
- Ed. 2, Ch. 4 - Terraform modules. Remote state location for webserver uses key for mysql HOT 1
- Chapter 2, 3rd Edition, failed to retrieve auto scaling groups HOT 4
- Chapter 7, 3rd edition - IAM role required to create new AWS account failed to allow login acces HOT 1
- Chapter 2 - "Deploy a Single Server" needs updating now that EC2 classic is retired. HOT 3
- Chapter-3 - webserver not showing proper html format. HOT 2
- Chapter 2, 3rd Edition: one-webserver ended up with 2 running instances HOT 2
- aws_launch_configuration: "couldn't find resource" on terraform apply HOT 2
- Chapter 5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-up-and-running-code.