Skip to content
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

CI: test pass even though bin/quick-start-test.sh fails in before_script #749

Closed
gr2m opened this issue May 28, 2017 · 3 comments · Fixed by #759
Closed

CI: test pass even though bin/quick-start-test.sh fails in before_script #749

gr2m opened this issue May 28, 2017 · 3 comments · Fixed by #759

Comments

@gr2m
Copy link
Member

gr2m commented May 28, 2017

see https://travis-ci.org/hoodiehq/hoodie/builds/236919898#L599

For one, the error doesn’t make sense to me, pouchdb-browser was installed above so I’m not sure what is happening here. Maybe a problem with npm@2, I can’t test that right now

But more importantly, the tests should fail if the bin/quick-start-test.sh script fails

Update

It is in fact a problem with npm@2: #758

@gr2m gr2m mentioned this issue May 28, 2017
@gr2m
Copy link
Member Author

gr2m commented Jun 3, 2017

the problem is that curl -I http://localhost:8080/hoodie/client.js does not fail, the request gets through, but the server does not respond with the bundled client but a server error

$ curl -I http://localhost:8080/hoodie/client.js
HTTP/1.1 500 Internal Server Error
content-type: application/json; charset=utf-8
cache-control: no-cache
content-length: 96
vary: accept-encoding
Date: Sat, 03 Jun 2017 14:36:46 GMT
Connection: keep-alive

It should be something like this

$ curl -I http://localhost:8080/hoodie/client.js
HTTP/1.1 200 OK
Server: nginx/1.9.9
Date: Sat, 03 Jun 2017 14:37:20 GMT
Content-Type: application/javascript; charset=utf-8
Content-Length: 774709
Connection: keep-alive
cache-control: no-cache
vary: accept-encoding
Strict-Transport-Security: max-age=31536000

Is there any way we can test that? Ping @benwhite-deltas

@janl
Copy link
Member

janl commented Jun 3, 2017

Maybe curl --fail helps? From man curl:

       -f, --fail
              (HTTP) Fail silently (no output at all) on server errors. This is  mostly  done
              to  better  enable  scripts  etc to better deal with failed attempts. In normal
              cases when an HTTP server fails to deliver a document, it returns an HTML docu-
              ment  stating so (which often also describes why and more). This flag will pre-
              vent curl from outputting that and return error 22.

              This method is not fail-safe  and  there  are  occasions  where  non-successful
              response  codes  will  slip through, especially when authentication is involved
              (response codes 401 and 407).

@gr2m
Copy link
Member Author

gr2m commented Jun 3, 2017

PR: #759

@gr2m gr2m closed this as completed in #759 Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants