Univention Bugzilla – Bug 40296
write tests for the office 365 listener
Last modified: 2023-03-25 06:52:48 CET
While it would be nice to use a different channel for testing the listener, C# code using MS libraries on Mono are not well maintainable for us… maybe we can find usable PHP or JS code, but I suggest to just go for code coverage and use the Apps code for all communication with Azure. The AzureAuth and AzureHandler classes can be used without the listener. So this would work: 1. udm users/user modify ... givenName=abc # uses listener 2. sleep x # ~10s 3. AzureHandler.list_users(...)["givenName"] == abc # creates connection from ucs-test, using same credentials as listener For automated tests an Azure account is sufficient - no Office 365 account is needed. The wizard part has to be skipped. That means that an Azure account + App has to be created and a TGZ of the resulting /etc/univention-office365 has to be stored in a secure location accessible only to Univention staff and jenkins.
10 ucs-tests are in the same source package
ucs-tests for office365 look good. There are currently two tests failing, which are not critical. They are merely not adapted to code changes in the app itself. These issues will be tracked via Bug 41184 -> Verified