p2-inc / keycloak-orgs

Single realm, multi-tenancy for SaaS apps
Other
362 stars 65 forks source link

Update tests to use Testcontainers #108

Closed xgp closed 7 months ago

xgp commented 11 months ago

The KeycloakServer in testsuite doesn't get released, and makes it hard for other people to run these tests. It's also clear that it has diverged from running a "real" Keycloak server, so we are potentially missing some things in our tests.

We should port to use dasniko's keycloak testcontainers. We did the port in keycloak-themes already, so we should be able to use it as a model https://github.com/p2-inc/keycloak-themes/pull/12

xgp commented 10 months ago

This somewhat complicated by the fact that OrganizationProviderTest needs a KeycloakSession directly. I don't have a great idea of how to maintain those tests without KeycloakServer.

xgp commented 10 months ago

https://github.com/p2-inc/keycloak-orgs/pull/120

ngaxavi commented 9 months ago

I can help to write tests using Testcontainers

xgp commented 9 months ago

Thanks @ngaxavi

I’ve got a branch with a start on this that I’ll push tonight.

xgp commented 9 months ago

@ngaxavi Branch https://github.com/p2-inc/keycloak-orgs/tree/xgp/testcontainers

ngaxavi commented 9 months ago

@xgp can you give access to this branch https://github.com/p2-inc/keycloak-orgs/tree/xgp/testcontainers so that I push my changes.

xgp commented 9 months ago

@ngaxavi Just fork off that branch and open a new PR.

xgp commented 7 months ago

Fixed by #130