altinn-studio
altinn-studio copied to clipboard
Add more test users and support for subscribing to events in localtest
Description
Related Issue(s)
- #8969
Verification
- [ ] Your code builds clean without any errors or warnings
- [ ] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and we'll help out)
- [ ] All tests run green
Documentation
- [ ] User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
@SandGrainOne @acn-sbuad This is a "collection" of changes required to run the DIHE application locally.
- I've added a dead simple implementation of subscription endpoint in Events just to be able call it locally - something we can live with or would you like to see a more implemented?
- I've included the test users used in the DIHE solution and extended the two we have - do we see any issues with this?
- I've also added Json Propertynames on eFormidling as this was missing and the deserialization didn't work
Is the correct approach to just add more and more users in localtest?
This is a requirement for most apps that use apis based on user information, and adding users doesn't seem very scalable. How about we instead let LocalTest fetch additional registry data from the running app? (just as we now fetch policy.xml
for authorization). It would be a new API, but Ola Nordmann and Sofie Salt would still work for old apps, and only LocalTest will use the api, so it is safe to deploy the api to production.
This is a requirement for most apps that use apis based on user information, and adding users doesn't seem very scalable. How about we instead let LocalTest fetch additional registry data from the running app? (just as we now fetch
policy.xml
for authorization).
I don't quite understand what you mean. Where would the app get the user data?
I don't quite understand what you mean. Where would the app get the user data?
Just a few json files in a folder named TestRegistry
in the app repo. I assume the app developers knows what kind of users they want to use in testing.
@ivarne @SandGrainOne regarding adding more and more test users in localtest. I agree that this probably isn't the way forward as it would be a global set of test data to support every app's specific user needs (roles etc.). I think we should re-think the test user strategy and for example look at https://www.skatteetaten.no/en/forms/tenor-test-data/ and perhaps avoid managing test users on our side all together. Either way it's a bigger issue than I have time for right now, but I'll create a new issue (if we don't have one) to deal with it.