Repository navigation
mgr/dashboard: Fixed documentation link on RGW page - #24612
Conversation
|
Thank you for your contribution! Can you please amend the title of this PR and the git commit message to refer to the component and a description of the problem you're addressing, e.g.: |
There was a problem hiding this comment.
Linting Error:
ERROR: /ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-501/rgw-501.component.ts[30, 1]: Exceeds maximum line length of 100
You can check linting errors by running npm run lint
There was a problem hiding this comment.
Unit tests are also failing due to a missing import:
FAIL src/app/ceph/rgw/rgw-501/rgw-501.component.spec.ts
● Rgw501Component › should create
StaticInjectorError(DynamicTestModule)[HttpClient]:
StaticInjectorError(Platform: core)[HttpClient]:
NullInjectorError: No provider for HttpClient!
You can execute unit tests by running npm run test
There was a problem hiding this comment.
The linting error is now fixed. However, I still have problems running the unit tests. It looks like this. Is this related to the missing import or is this something else?
tina@tina-VirtualBox:~/ceph/src/pybind/mgr/dashboard/frontend$ npm run test
> [email protected] test /home/tina/ceph/src/pybind/mgr/dashboard/frontend
> jest --watch
Error: watch /home/tina/ceph/src/pybind/mgr/dashboard/frontend ENOSPC
at FSWatcher.start (fs.js:1382:19)
at Object.fs.watch (fs.js:1408:11)
at NodeWatcher.watchdir (/home/tina/ceph/src/pybind/mgr/dashboard/frontend/node_modules/sane/src/node_watcher.js:175:20)
at new NodeWatcher (/home/tina/ceph/src/pybind/mgr/dashboard/frontend/node_modules/sane/src/node_watcher.js:45:8)
at createWatcher (/home/tina/ceph/src/pybind/mgr/dashboard/frontend/node_modules/jest-haste-map/build/index.js:768:23)
at Array.map (<anonymous>)
at HasteMap._watch (/home/tina/ceph/src/pybind/mgr/dashboard/frontend/node_modules/jest-haste-map/build/index.js:919:44)
at _buildPromise._buildFileMap.then.then.hasteMap (/home/tina/ceph/src/pybind/mgr/dashboard/frontend/node_modules/jest-haste-map/build/index.js:343:23)
at <anonymous>
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `jest --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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/tina/.npm/_logs/2018-10-16T19_55_22_998Z-debug.log
There was a problem hiding this comment.
can you try "npm run test:ci"?
There was a problem hiding this comment.
Maybe a problem with the npm version, try:
source ~/ceph/build/src/pybind/mgr/dashboard/node-env/bin/activate
npm test
If this doesn't fix the problem, try to remove the node_modules:
rm -r ~/ceph/src/pybind/mgr/dashboard/frontend/node_modules
npm install
npm test
There was a problem hiding this comment.
Possible reason: jestjs/jest#3254
If you are using VS Code, the best solution, would be to blacklist most of the directories from the watch feature. I have done this and can help you with it.
Otherwise you might need to run the command they suggest.
There was a problem hiding this comment.
Yes, that seems to be the problem, since it works when I close down VS Code. But it is a bit unpractical to close it down every time I want to run the tests, so I'd be happy if you could show me how to blacklist the directories, tspmelo.
I've fixed the import issue so now the code passes npm run test and npm run lint. However I still have problems with something called lint:prettier. I'm unfamiliar with this tool, but could this be something as simple as an indention? I can't see my mistake now but I will go through it again tomorrow.
tina@tina-VirtualBox:~/ceph/src/pybind/mgr/dashboard/frontend$ npm run lint
> [email protected] lint /home/tina/ceph/src/pybind/mgr/dashboard/frontend
> npm run lint:tslint && npm run lint:prettier && npm run lint:html
> [email protected] lint:tslint /home/tina/ceph/src/pybind/mgr/dashboard/frontend
> ng lint ceph-dashboard ceph-dashboard-e2e
All files pass linting.
> [email protected] lint:prettier /home/tina/ceph/src/pybind/mgr/dashboard/frontend
> prettier --list-different "{src,e2e}/**/*.{ts,scss}"
src/app/ceph/rgw/rgw-501/rgw-501.component.ts
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint:prettier: `prettier --list-different "{src,e2e}/**/*.{ts,scss}"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] lint:prettier 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/tina/.npm/_logs/2018-10-17T20_44_06_884Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint: `npm run lint:tslint && npm run lint:prettier && npm run lint:html`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] lint 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/tina/.npm/_logs/2018-10-17T20_44_06_902Z-debug.log
bc83b40 to
2c79640
Compare
2c79640 to
601a429
Compare
Fixes: https://tracker.ceph.com/issues/24548
Signed-off-by: Tina Kallio [email protected]