You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Tenant schema uses the has_one :realm, Realm relationship, but Edgehog allows to create a few realms associated with the same tenant.
test"create_realm/2 allows to create few realms in the same tenant",%{tenant: tenant,cluster: cluster}dorealm1=Edgehog.AstarteFixtures.realm_fixture(cluster,name: "realm1")valid_attrs=%{name: "realm2",private_key: @valid_private_key}assert{:ok,%Realm{}=realm2}=Edgehog.Astarte.create_realm(cluster,valid_attrs)tenant=Edgehog.Tenants.preload_astarte_resources_for_tenant(tenant)# 2 realms are associated with tenantassert[realm1,realm2]==Edgehog.Astarte.list_realms()# tenant returns only one realmasserttenant.realm==Edgehog.Repo.preload(realm1,[:cluster],skip_tenant_id: true)end
Also, if there are multiple realms associated with the same tenant, the reconciliation and cleanup after delete tasks will only use one realm.
The text was updated successfully, but these errors were encountered:
The Tenant schema uses the
has_one :realm, Realm
relationship, but Edgehog allows to create a few realms associated with the same tenant.Also, if there are multiple realms associated with the same tenant, the
reconciliation
andcleanup after delete
tasks will only use one realm.The text was updated successfully, but these errors were encountered: