Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: mock-insights: fix/improve handling of IDs
Currently, the fake systems (or better, only one) is kept in the helper "systems" dictionary by the machine ID; while this seems to work fine, in practice it will not work for upcoming changes, and it does not match what Inventory actually does. Change the ID handling to represent better what Inventory does: - assign "id" as Inventory ID for each newly registered system; in practice we have only one, and keep hardcoding "123-nice-id" for now (the "testInsights" test checks for it) - use the "id" as key in the "systems" dictionary, rather than the "machine_id" - when registering a new system, copy "machine_id" as "insights_id"; this will help later on when implementing the non-legacy API endpoints - adapt endpoints to search for the ID they need Even with all the changes, there should be no behaviour changes.
- Loading branch information