Closed ggonzr closed 1 week ago
Some test cases submit/inject requests to other CMS services like ReqMgr2. Make sure the testing environment can authenticate these actions by using certificates and that it is possible to open SSH sessions to CERN internal servers to generate the configuration used in the submission process.
Could these tests be marked with flags and disabled by default? I'm worried that running the tests with my personal certificate would end up creating jobs (I was able to use it to authenticate with ReqMgr in the past). Opening SSH sessions to lxplus
won't be very OTP-compatible once deployed, and deploying a CouchDB instance within the CERN network is a whole lot more complicated than deploying containers locally.
Thanks for the feedback. Related to:
Could these tests be marked with flags and disabled by default? I'm worried that running the tests with my personal certificate would end up creating jobs (I was able to use it to authenticate with ReqMgr in the past).
The latest commits implement this feature and skip tests injecting to ReqMgr2 unless REQMGR2_ENABLED
is set. Related to submitting requests to ReqMgr2, only the request will be created but it is always targeting the development instance and it will never start running so no worries on this aspect.
Opening SSH sessions to
lxplus
won't be very OTP-compatible once deployed
You're right, thanks for highlighting this. Users who would like to execute these tests could follow the alternative described in KB0009800 before starting the execution.
and deploying a CouchDB instance within the CERN network is a whole lot more complicated than deploying containers locally.
It is not required as the deploy/action.sh
script deploys these instances locally using containers. In case I'm missing something, could you give more details?
Related to: https://github.com/cms-PdmV/cmsPdmV/issues/1124
This includes several test cases to check the functionality of the main entities and their operations by consuming REST API endpoints. Some operations were not feasible to test, for example, those related to sending email notifications to users. The test module was refactored to reuse the PdmV REST module instead of providing its own implementation to send HTTP requests. Most of the test cases also check if a role can carry an operation like
update
an entity orinspect
a request or if it is forbidden because of a lack of permissions.The configuration for sending requests to the testing environment can be set via the following environment variables:
COUCH_CRED
: Credentials for the CouchDB instance, e.g:Basic dGVzdDp0ZXN0
MCM_COUCHDB_URL
: URL to the CouchDB instance, e.g:http://localhost:8000/
MCM_LUCENE_URL
: URL to the CouchDB Lucene instance, e.g:http://localhost:8001/
MCM_HOST
: Hostname for the web application deployment, e.g:localhost
MCM_PORT
: Web application port, e.g:8003
Some test cases submit/inject requests to other CMS services like ReqMgr2. Make sure the testing environment can authenticate these actions by using certificates and that it is possible to open SSH sessions to CERN internal servers to generate the configuration used in the submission process.