Common Refactoring Patterns. Corsair team.
Overview
This page is documentation for the common patterns applied to all 3 modules during migration from Okapi to Eureka:
mod-lists
mod-fqm-manager
edge-fqm
edge-fqm
has some additional major changes that described on this page
mod-fqm-manager
has some adjustment in consortia scenarios and could be found on this page
Capabilities changes
Replaced wildcard *.all
permissions with granular capabilities. This change was necessary because *.all
was not consistently working (on Eureka).
//Example of old permissions
* table userPermissions
| name |
| 'fqm.query.all' |
//Replaced with nessesary capabilities
* table userPermissions
| name |
| 'fqm.query.sync.get' |
| 'fqm.query.purge.post' |
| 'fqm.query.async.results.query.get' |
| 'fqm.query.async.post' |
| 'fqm.query.async.delete' |
| 'fqm.query.async.results.get' |
x-okapi-tenant Header Enforcement
All requests MUST now include the tenant header for proper Eureka routing. The added header is:
'x-okapi-tenant': '#(testTenant)'
‘testTenant’
variable declared in karate-config.js
and creates before all tests scenarios are run.
More information about tenant creation and set-up scenarios could be found on this page
Absence of test Admin user
In Eureka there is no scenario for testAdmin
user creation. All admin related scenarios now must be executed under testUser
user(so now you need to grant needed capabilities for those scenarios to testUser
also)
Since there is scenarios in mod-lists
, that was executed under testAdmin
, and it was needed that those scenarios will be executed under different users, new approach is described on this page