-
Notifications
You must be signed in to change notification settings - Fork 17
More flexible challenge code generation in tests #1073
Copy link
Copy link
Closed
Labels
D1-featureA new feature, a piece of functionality that needs to be developedA new feature, a piece of functionality that needs to be developedI3-highshould be completed within 5 working daysshould be completed within 5 working days
Description
Context
The challenge code is always hardcoded when mockserver feature is activated: https://github.com/litentry/litentry-parachain/blob/c485920fbdc980fcf0a8aac1ace9011c6606c8d1/tee-worker/app-libs/stf/src/helpers.rs#L134-L141
This makes it impossible to test e.g. #981, where we want to explicitly check the update of challenge code.
We need to either:
- remove the hardcoded challenge code, and make mockserver to read the challenge code live from the chain state
or - still use hardcoded but make it different each time, e.g. calculated from some outside inputs (env/command line/....)
And generally I'm not a fan ofmockserver feature as it requires a re-compilation and makes the test switch between dev/staging hard. Can we somehow remove this feature and use unified codebase? E.g. fully controlled by command line or startup args for worker.
✔️ Please set appropriate labels and assignees if applicable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
D1-featureA new feature, a piece of functionality that needs to be developedA new feature, a piece of functionality that needs to be developedI3-highshould be completed within 5 working daysshould be completed within 5 working days