nuxeo / nuxeo-js-client

JavaScript client library for Nuxeo API
Other
18 stars 20 forks source link

tests fail with out-of-the-box Nuxeo and nuxeo-js-client #110

Closed Trott closed 2 years ago

Trott commented 3 years ago

I'm on macOS Catalina. If I have a docker image running an untouched Nuxeo on port 8080 and I run yarn test:node, I get two failures:

  1) Multi Repository
       "before all" hook in "Multi Repository":
     Error: Internal Server Error
      at /Users/trott/nuxeo-js-client/lib/nuxeo.js:159:27
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:93:5)

  2) Operation
       #execute
         should execute an operation with an input being
           non-existing document:
     Error: Method Not Allowed
      at /Users/trott/nuxeo-js-client/lib/nuxeo.js:159:27
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:93:5)

error Command failed with exit code 2.

I'm running Node.js 15.4.0.

Just me? Or others can replicate this?

Trott commented 3 years ago

Same errors using Node.js 14.x, 12.x, and 10.x.

troger commented 3 years ago

Hello,

The tests are relying on Nuxeo contributions that should be deployed on the server.

As a workaround, assuming you are using Nuxeo 10.10, you can run the image with the following command:

docker run -it --rm --name nux -p 8080:8080 \
-v $(pwd)/ftest/src/test/resources/nuxeo-js-operations-config.xml:/opt/nuxeo/server/templates/common/config/nuxeo-js-operations-config.xml \
-v $(pwd)/ftest/src/test/resources/nuxeo-js-other-repository-config.xml:/opt/nuxeo/server/templates/common/config/nuxeo-js-other-repository-config.xml \
-v $(pwd)/ftest/src/test/resources/nuxeo-js-elasticsearch-config.xml:/opt/nuxeo/server/templates/common/config/nuxeo-js-elasticsearch-config.xml \
-v $(pwd)/ftest/src/test/resources/nuxeo-js-jwt-config.xml:/opt/nuxeo/server/templates/common/config/nuxeo-js-jwt-config.xml \
nuxeo:10.10

We will work on updating the documentation.