Giter VIP home page Giter VIP logo

Comments (10)

brikis98 avatar brikis98 commented on May 22, 2024 1

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.

brikis98 avatar brikis98 commented on May 22, 2024 1

Fixed in #58.

from terraform-up-and-running-code.

brikis98 avatar brikis98 commented on May 22, 2024

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.

kavemun avatar kavemun commented on May 22, 2024

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.

kavemun avatar kavemun commented on May 22, 2024

my mistake.. typo there. thanks for pointing that out.

from terraform-up-and-running-code.

kavemun avatar kavemun commented on May 22, 2024

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.

brikis98 avatar brikis98 commented on May 22, 2024

Which test is this? What chapter/section?

from terraform-up-and-running-code.

kavemun avatar kavemun commented on May 22, 2024

Chapter 7, Dependency Injection Test Codes, Pg 243 onwards

from terraform-up-and-running-code.

brikis98 avatar brikis98 commented on May 22, 2024

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.

kavemun avatar kavemun commented on May 22, 2024

thanks for the fix

from terraform-up-and-running-code.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.