Table of Contents

Testing

tbd

Old approach - sync IdM, rollbackable database

IdM tests were written with these assumptions:

These assuptions enable writing isolated tests, rollbacking DB transaction cleans data (and there's cache clean up processing in case of transaction rollback in default test helper too). It is not perfect, there are ignored tests with note that some other test breaks their data.

New approach - async IdM due to Kafka

With Kafka introduction, both assumptions are false. Kafka was firstly used in notifications and notifications are involved in almost any action. Kafka usage also means you can't encapsulate test into separate DB transaction because Kafka listener reading from DB wouldn't see data written by test transaction. And this means you have to be aware of there can be data in database before test. Or you should clean data manually after every test.

Therefore, ideal test taking new reality into account should: