-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
[BUG] Mocha test that passes locally fails in CI #646
Comments
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:
while a head request: i ll have to dig deeper into that. Calls to the rest endpoint are |
@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 |
- skip test that passes locally but fails in CI: eXist-db/generator-exist#646 - chai assert.fileContent doesn’t seem to have a case-insensitive search
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
? noneThe text was updated successfully, but these errors were encountered: