Test are failing
Problem
In the work of solving #160 (closed), the test
job fails with the following error message:
Test job logs
Using Docker executor with image hub.eole.education/proxyhub/geoffreybooth/meteor-base:2.12 ...
Pulling docker image hub.eole.education/proxyhub/geoffreybooth/meteor-base:2.12 ...
Using docker image sha256:a0f80d3dea34987b65a5604a47a5a8f226be4faf3edf76dc358214a7eb8eb8e5 for hub.eole.education/proxyhub/geoffreybooth/meteor-base:2.12 with digest hub.eole.education/proxyhub/geoffreybooth/meteor-base@sha256:ee75950adc4154bfb6edad8f842e4cd76411007fc60e62d05f483f5f4a5da888 ...
Preparing environment 00:00
Running on runner-ggtkypem-project-1049-concurrent-0 via gitlab-runner-385-docker-0...
Getting source from Git repository
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/daniel.dehennin/questionnaire/.git/
Checking out 673c7b1b as 160-ajouter-le-ci...
Removing app/.meteor/local/
Removing app/node_modules/
Skipping Git submodules setup
Restoring cache 00:08
Checking cache for 0_app/package_app/package-lock-fcd8af103b0e0f1cd5e010cb9e69e3e1d782a82b-non_protected...
cache.zip is up to date
Successfully extracted cache
Executing "step_script" stage of the job script
Using docker image sha256:a0f80d3dea34987b65a5604a47a5a8f226be4faf3edf76dc358214a7eb8eb8e5 for hub.eole.education/proxyhub/geoffreybooth/meteor-base:2.12 with digest hub.eole.education/proxyhub/geoffreybooth/meteor-base@sha256:ee75950adc4154bfb6edad8f842e4cd76411007fc60e62d05f483f5f4a5da888 ...
$ cd app
$ meteor npm test
> app@0.0.1 test /builds/daniel.dehennin/questionnaire/app
> meteor test --once --exclude-archs 'web.browser.legacy, web.cordova' --driver-package meteortesting:mocha --allow-superuser
Even with METEOR_ALLOW_SUPERUSER or --allow-superuser, permissions in your app
directory will be incorrect if you ever attempt to perform any Meteor tasks as
a normal user. If you need to fix your permissions, run the following command
from the root of your project:
sudo chown -Rh <username> .meteor/local
[[[[[ Tests ]]]]]
=> Started proxy.
=> Started HMR server.
=> Started MongoDB.
I20230621-09:11:27.638(0)?
I20230621-09:11:27.650(0)? --------------------------------
I20230621-09:11:27.650(0)? ----- RUNNING SERVER TESTS -----
I20230621-09:11:27.651(0)? --------------------------------
I20230621-09:11:27.651(0)?
I20230621-09:11:27.651(0)?
I20230621-09:11:27.651(0)?
I20230621-09:11:27.651(0)? forms
I20230621-09:11:27.651(0)? mutators
=> Started your app.
=> App running at: http://localhost:3000/
I20230621-09:11:27.653(0)? ✓ builds correctly from factory (140ms)
I20230621-09:11:27.654(0)? methods
I20230621-09:11:27.654(0)? 1) does create a form
I20230621-09:11:27.654(0)? ✓ does get a form
I20230621-09:11:27.654(0)? 2) does get user forms
I20230621-09:11:27.654(0)?
I20230621-09:11:27.654(0)?
I20230621-09:11:27.654(0)? 2 passing (569ms)
I20230621-09:11:27.655(0)? 2 failing
I20230621-09:11:27.655(0)?
I20230621-09:11:27.655(0)? 1) forms
I20230621-09:11:27.655(0)? methods
I20230621-09:11:27.655(0)? does create a form:
I20230621-09:11:27.655(0)? ClientError: Answer required is required
I20230621-09:11:27.655(0)? at packages/modules.js:1564:27
I20230621-09:11:27.655(0)? at Array.forEach (<anonymous>)
I20230621-09:11:27.655(0)? at SimpleSchema.validate (packages/modules.js:1555:17)
I20230621-09:11:27.655(0)? at Object.<anonymous> (packages/modules.js:1609:25)
I20230621-09:11:27.656(0)? at ValidatedMethod._execute (packages/mdg:validated-method/validated-method.js:134:64)
I20230621-09:11:27.656(0)? at imports/api/forms/server/forms.tests.js:40:24
I20230621-09:11:27.656(0)? at /root/.meteor/packages/promise/.0.12.2.u4k9kt.z2rem++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40
I20230621-09:11:27.656(0)?
I20230621-09:11:27.656(0)? 2) forms
I20230621-09:11:27.656(0)? methods
I20230621-09:11:27.656(0)? does get user forms:
I20230621-09:11:27.656(0)? ClientError: Answer required is required
I20230621-09:11:27.656(0)? at packages/modules.js:1564:27
I20230621-09:11:27.656(0)? at Array.forEach (<anonymous>)
I20230621-09:11:27.657(0)? at SimpleSchema.validate (packages/modules.js:1555:17)
I20230621-09:11:27.657(0)? at Object.<anonymous> (packages/modules.js:1609:25)
I20230621-09:11:27.657(0)? at ValidatedMethod._execute (packages/mdg:validated-method/validated-method.js:134:64)
I20230621-09:11:27.657(0)? at imports/api/forms/server/forms.tests.js:57:24
I20230621-09:11:27.657(0)? at /root/.meteor/packages/promise/.0.12.2.u4k9kt.z2rem++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40
I20230621-09:11:27.657(0)?
I20230621-09:11:27.657(0)?
I20230621-09:11:27.657(0)?
I20230621-09:11:27.657(0)? Load the app in a browser to run client tests, or set the TEST_BROWSER_DRIVER environment variable. See https://github.com/meteortesting/meteor-mocha/blob/master/README.md#run-app-tests
npm ERR! Test failed. See above for more details.
Edited by Daniel Dehennin