Skip to content
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

mgr/dashboard: Allow sourcing run-backend-api-tests.sh #20874

Merged

Conversation

sebastian-philipp
Copy link
Contributor

@sebastian-philipp sebastian-philipp commented Mar 13, 2018

This allows us to re-run tests faster.

Signed-off-by: Sebastian Wagner sebastian.wagner@suse.com

Usage (run from ./):
./run-backend-api-tests.sh
./run-backend-api-tests.sh [tests]...

Example:
./run-backend-api-tests.sh tasks.mgr.dashboard.test_pool.DashboardTest

Or source this script. Allows to re-run tests faster:
$ source run-backend-api-tests.sh
$ setup_teuthology
$ run_teuthology_tests [tests]...
$ cleanup_teuthology

@sebastian-philipp
Copy link
Contributor Author

Jenkins failed with

> node@8.10.0 preinstall /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard_v2/frontend/node_modules/.staging/node-027c73dd
> node installArchSpecificPackage

module.js:471
    throw err;
    ^

Error: Cannot find module 'node-bin-setup'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard_v2/frontend/node_modules/.staging/node-027c73dd/installArchSpecificPackage.js:1:63)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

@sebastian-philipp
Copy link
Contributor Author

Jenkins retest please

@sebastian-philipp sebastian-philipp force-pushed the dashboard_v2-source-run-api-tests branch 2 times, most recently from 4ff5d37 to 94917d5 Compare March 14, 2018 11:52
Copy link
Contributor

@LenzGr LenzGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I like this approach.

Copy link
Contributor

@rjfd rjfd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really really useful, many thanks!

Besides the comment I left, could you also update the HACKING documentation with instructions on how to use this script?


setup_teuthology
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this up to the sourced section? I think usually everyone wants to run this at the start, so it would be one less step to run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@sebastian-philipp sebastian-philipp force-pushed the dashboard_v2-source-run-api-tests branch from 94917d5 to 1087f8c Compare March 15, 2018 10:29
sleep 5

cd $CURR_DIR
rm -rf $TEMP_DIR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider removing the defined functions in the cleanup routine using unset -f <function_name>. If this isn't done, the functions will stay available after clean_teuthology has been called.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed. Although, I'll now need to retest my latest changes again.

@sebastian-philipp
Copy link
Contributor Author

@rjfd: I just updated the documentation

@LenzGr LenzGr changed the title mgr/dashboard_v2: Allow sourcing run-backend-api-tests.sh mgr/dashboard: Allow sourcing run-backend-api-tests.sh Mar 16, 2018
This allows us to re-run tests faster. Also updated
HACKING.rst with the latest changes.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
@sebastian-philipp sebastian-philipp force-pushed the dashboard_v2-source-run-api-tests branch from c9288ba to f4d2f01 Compare March 16, 2018 14:06
@rjfd rjfd merged commit 559e05c into ceph:master Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants