Hola,
Llevo 2 días con mi raspberry pi 4 disponible para crear un pequeño servidor y ejecutar Gladys 4. Con el fin de aportar mis modificaciones, voy directamente por Git, como se describe en la documentación.
Por lo tanto, he clonado el repositorio en una carpeta, instalado a través de npm el servidor y el front, migrado la base de datos, pero a pesar de todo obtengo estos errores después de iniciar la prueba:
Lado del servidor:
pi@raspberrypi:~/gladys/server $ npm test
> gladys-server@ pretest /home/pi/gladys/server
> cross-env SQLITE_FILE_PATH=/tmp/gladys-test.db npm run db-migrate:test && npm run eslint
> gladys-server@ db-migrate:test /home/pi/gladys/server
> cross-env NODE_ENV=test node_modules/.bin/sequelize db:migrate
Sequelize CLI [Node: 10.16.3, CLI: 5.4.0, ORM: 4.44.3]
Loaded configuration file "config/config.js".
Using environment "test".
== 20190211042644-create-calendar-event: migrating =======
ERROR: SQLITE_ERROR: index t_calendar_event_calendar_id already exists
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gladys-server@ db-migrate:test: `cross-env NODE_ENV=test node_modules/.bin/sequelize db:migrate`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gladys-server@ db-migrate:test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-10-17T09_25_49_725Z-debug.log
npm ERR! Test failed. See above for more details.
Lado del front:
pi@raspberrypi:~/gladys/server $ cd ../front/
pi@raspberrypi:~/gladys/front $ npm test
> gladys-front@ test /home/pi/gladys/front
> jest --coverage
FAIL tests/header.test.js
Initial Test of the Header
✕ Header renders Gladys Assistant title and 8 items in header (78ms)
✓ Should return null, login page doesnt need a header (2ms)
✕ [Backslash URL] Header renders Gladys Assistant title and 8 items in header (17ms)
✓ [Backslash URL] Should return null, login page doesnt need a header (1ms)
● Initial Test of the Header › Header renders Gladys Assistant title and 8 items in header
expect(received).toBe(expected)
Expected value to be (using ===):
"Gladys Assistant"
Received:
""
at Object.<anonymous> (tests/header.test.js:25:305)
at new Promise (<anonymous>)
● Initial Test of the Header › [Backslash URL] Header renders Gladys Assistant title and 8 items in header
expect(received).toBe(expected)
Expected value to be (using ===):
"Gladys Assistant"
Received:
""
at Object.<anonymous> (tests/header.test.js:25:728)
at new Promise (<anonymous>)
Test Suites: 1 failed, 1 total
Tests: 2 failed, 2 passed, 4 total
Snapshots: 0 total
Time: 1.956s
Ran all test suites.
-------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
-------------------|----------|----------|----------|----------|-------------------|
All files | 100 | 66.67 | 100 | 100 | |
components/header | 100 | 57.14 | 100 | 100 | |
index.jsx | 100 | 57.14 | 100 | 100 |35,41,45,73,96,114 |
utils | 100 | 100 | 100 | 100 | |
url.js | 100 | 100 | 100 | 100 | |
-------------------|----------|----------|----------|----------|-------------------|
npm ERR! Test failed. See above for more details.
pi@raspberrypi:~/gladys/front $
Sin embargo, tengo sqlite3 instalado, node y npm funcionan bien, y estoy intentando instalar directamente después de clonar el repositorio Gladys.
Lado del servidor, el problema provendría de índices duplicados en la base de datos.
Lado del front, tengo un error en la definición del Header.
¿Podrían proporcionarme algunas pistas de búsqueda? Tengo muchas ganas de poder comenzar a desarrollar los servicios que necesito ![]()
Gracias de antemano.
