Open joewiz opened 3 years ago
hmm something is strange in this neighbourhood. OOTB i m getting passing tests both on CI and local when doing this.
SO my initial guess was to increase the timeout like this
describe('rest api returns', function () {
this.timeout(1500)
it('application root is available from rest endpoint', function (done) {
client
.get('/exist/rest/db/apps/airlock')
.expect(200)
.end(function (err, res) {
expect(res.status).to.equal(200)
if (err) return done(err)
done()
})
})
})
which since it was green before is still green. But maybe you can give that a try to see if that solves the problem on ci.
However, digging a little deeper i noticed, that:
curl -i http://localhost:8080/exist/apps/GH646/index.html
returns (among others):
HTTP/1.1 200 OK
while a head request:
curl -I http://localhost:8080/exist/apps/GH646/index.html
returns:
HTTP/1.1 400 Bad Request
i ll have to dig deeper into that. Calls to the rest endpoint are 200
as expected.
@duncdrum Thanks for looking into this! I tried increasing the timeout, but it didn't change the results - so tests still pass locally but fail in CI. My experience with curl matches yours, except that in my app I get a 405 Method Not Allowed error in the -I
variant. I'm still in an early phase of learning Roaster, but then again, the tests pass locally. Here's the latest: https://github.com/joewiz/airlock/actions/runs/678852673.
Describe the bug
A mocha test passes locally for me but is failing in CI. It’s a test that originated from this one in the generator-exist package. Here’s my app's version of the test, and here’s the failure in CI. From the logs, it looks like the request to /exist/rest/db/apps/airlock is returning a 404 in CI, whereas on my machine this request is returning a 200 as I’d expect.
When I described this to @duncdrum, he wrote:
I'm happy to provide any other info that would be useful. Thanks in advance!
Expected behavior
I'd expect a test that passes locally to also pass in CI.
To Reproduce
Here is a trimmed version of the mocha test that fails in CI but passes locally:
Running
npm test
locally, I get:On CI it returns:
Context (please always complete the following information):
Additional context
conf.xml
? none