mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 14:37:32 +00:00
instance custom domain event tests done
This commit is contained in:
@@ -4,6 +4,7 @@ package events_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -14,11 +15,12 @@ import (
|
||||
"github.com/zitadel/zitadel/backend/v3/storage/database"
|
||||
"github.com/zitadel/zitadel/backend/v3/storage/database/dialect/postgres"
|
||||
"github.com/zitadel/zitadel/internal/integration"
|
||||
v2beta "github.com/zitadel/zitadel/pkg/grpc/instance/v2beta"
|
||||
v2beta_org "github.com/zitadel/zitadel/pkg/grpc/org/v2beta"
|
||||
"github.com/zitadel/zitadel/pkg/grpc/system"
|
||||
)
|
||||
|
||||
const ConnString = "host=localhost port=5432 user=zitadel dbname=zitadel sslmode=disable"
|
||||
const ConnString = "host=localhost port=5432 user=zitadel password=zitadel dbname=zitadel sslmode=disable"
|
||||
|
||||
var (
|
||||
dbPool *pgxpool.Pool
|
||||
@@ -35,12 +37,21 @@ func TestMain(m *testing.M) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Minute)
|
||||
defer cancel()
|
||||
|
||||
Instance = integration.NewInstance(ctx)
|
||||
CTX = integration.WithSystemAuthorization(ctx)
|
||||
Instance = integration.NewInstance(CTX)
|
||||
|
||||
CTX = Instance.WithAuthorization(ctx, integration.UserTypeIAMOwner)
|
||||
SystemClient = integration.SystemClient()
|
||||
OrgClient = Instance.Client.OrgV2beta
|
||||
|
||||
defer func() {
|
||||
_, err := Instance.Client.InstanceV2Beta.DeleteInstance(CTX, &v2beta.DeleteInstanceRequest{
|
||||
InstanceId: Instance.Instance.Id,
|
||||
})
|
||||
if err != nil {
|
||||
log.Printf("Failed to delete instance on cleanup: %v\n", err)
|
||||
}
|
||||
}()
|
||||
|
||||
var err error
|
||||
dbConfig, err := pgxpool.ParseConfig(ConnString)
|
||||
if err != nil {
|
||||
|
@@ -0,0 +1,224 @@
|
||||
//go:build integration
|
||||
|
||||
package events_test
|
||||
|
||||
import (
|
||||
"log"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/brianvoe/gofakeit/v6"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/zitadel/zitadel/backend/v3/storage/database"
|
||||
"github.com/zitadel/zitadel/backend/v3/storage/database/repository"
|
||||
"github.com/zitadel/zitadel/internal/integration"
|
||||
v2beta "github.com/zitadel/zitadel/pkg/grpc/instance/v2beta"
|
||||
"github.com/zitadel/zitadel/pkg/grpc/system"
|
||||
)
|
||||
|
||||
func TestServer_TestInstanceDomainReduces(t *testing.T) {
|
||||
instance := integration.NewInstance(CTX)
|
||||
|
||||
instanceRepo := repository.InstanceRepository(pool)
|
||||
instanceDomainRepo := instanceRepo.Domains(true)
|
||||
|
||||
t.Cleanup(func() {
|
||||
_, err := instance.Client.InstanceV2Beta.DeleteInstance(CTX, &v2beta.DeleteInstanceRequest{
|
||||
InstanceId: instance.Instance.Id,
|
||||
})
|
||||
if err != nil {
|
||||
t.Logf("Failed to delete instance on cleanup: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
// Wait for instance to be created
|
||||
retryDuration, tick := integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(ttt *assert.CollectT) {
|
||||
_, err := instanceRepo.Get(CTX,
|
||||
database.WithCondition(instanceRepo.IDCondition(instance.Instance.Id)),
|
||||
)
|
||||
assert.NoError(ttt, err)
|
||||
}, retryDuration, tick)
|
||||
|
||||
t.Run("test instance domain add reduces", func(t *testing.T) {
|
||||
// Add a domain to the instance
|
||||
domainName := gofakeit.DomainName()
|
||||
beforeAdd := time.Now()
|
||||
_, err := instance.Client.InstanceV2Beta.AddCustomDomain(CTX, &v2beta.AddCustomDomainRequest{
|
||||
InstanceId: instance.Instance.Id,
|
||||
Domain: domainName,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
afterAdd := time.Now()
|
||||
|
||||
t.Cleanup(func() {
|
||||
_, err := instance.Client.InstanceV2Beta.RemoveCustomDomain(CTX, &v2beta.RemoveCustomDomainRequest{
|
||||
InstanceId: instance.Instance.Id,
|
||||
Domain: domainName,
|
||||
})
|
||||
if err != nil {
|
||||
t.Logf("Failed to delete instance domain on cleanup: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
// Test that domain add reduces
|
||||
retryDuration, tick = integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(ttt *assert.CollectT) {
|
||||
domain, err := instanceDomainRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
instanceDomainRepo.InstanceIDCondition(instance.Instance.Id),
|
||||
instanceDomainRepo.DomainCondition(database.TextOperationEqual, domainName),
|
||||
),
|
||||
),
|
||||
)
|
||||
require.NoError(ttt, err)
|
||||
// event instance.domain.added
|
||||
assert.Equal(ttt, domainName, domain.Domain)
|
||||
assert.Equal(ttt, instance.Instance.Id, domain.InstanceID)
|
||||
assert.False(ttt, domain.IsPrimary)
|
||||
log.Printf("created at %v\n", domain.CreatedAt)
|
||||
log.Printf("after %v\n", afterAdd)
|
||||
log.Printf("before %v\n", beforeAdd)
|
||||
assert.WithinRange(ttt, domain.CreatedAt, beforeAdd, afterAdd)
|
||||
assert.WithinRange(ttt, domain.UpdatedAt, beforeAdd, afterAdd)
|
||||
}, retryDuration, tick)
|
||||
})
|
||||
t.Run("test instance domain set primary reduces", func(t *testing.T) {
|
||||
// Add a domain to the instance
|
||||
domainName := gofakeit.DomainName()
|
||||
_, err := instance.Client.InstanceV2Beta.AddCustomDomain(CTX, &v2beta.AddCustomDomainRequest{
|
||||
InstanceId: instance.Instance.Id,
|
||||
Domain: domainName,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
t.Cleanup(func() {
|
||||
// first we change the primary domain to something else
|
||||
domain, err := instanceDomainRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
instanceDomainRepo.InstanceIDCondition(instance.Instance.Id),
|
||||
instanceDomainRepo.IsPrimaryCondition(false),
|
||||
),
|
||||
),
|
||||
database.WithLimit(1),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
_, err = SystemClient.SetPrimaryDomain(CTX, &system.SetPrimaryDomainRequest{
|
||||
InstanceId: instance.Instance.Id,
|
||||
Domain: domain.Domain,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err = instance.Client.InstanceV2Beta.RemoveCustomDomain(CTX, &v2beta.RemoveCustomDomainRequest{
|
||||
InstanceId: instance.Instance.Id,
|
||||
Domain: domainName,
|
||||
})
|
||||
if err != nil {
|
||||
t.Logf("Failed to delete instance domain on cleanup: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
// Wait for domain to be created
|
||||
retryDuration, tick = integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(ttt *assert.CollectT) {
|
||||
domain, err := instanceDomainRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
instanceDomainRepo.InstanceIDCondition(instance.Instance.Id),
|
||||
instanceDomainRepo.DomainCondition(database.TextOperationEqual, domainName)),
|
||||
),
|
||||
)
|
||||
require.NoError(ttt, err)
|
||||
require.False(ttt, domain.IsPrimary)
|
||||
assert.Equal(ttt, domainName, domain.Domain)
|
||||
}, retryDuration, tick)
|
||||
|
||||
// Set domain as primary
|
||||
beforeSetPrimary := time.Now()
|
||||
_, err = SystemClient.SetPrimaryDomain(CTX, &system.SetPrimaryDomainRequest{
|
||||
InstanceId: instance.Instance.Id,
|
||||
Domain: domainName,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
afterSetPrimary := time.Now()
|
||||
|
||||
// Test that set primary reduces
|
||||
retryDuration, tick = integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(ttt *assert.CollectT) {
|
||||
domain, err := instanceDomainRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
instanceDomainRepo.InstanceIDCondition(instance.Instance.Id),
|
||||
instanceDomainRepo.IsPrimaryCondition(true),
|
||||
),
|
||||
),
|
||||
)
|
||||
require.NoError(ttt, err)
|
||||
// event instance.domain.primary.set
|
||||
assert.Equal(ttt, domainName, domain.Domain)
|
||||
assert.True(ttt, domain.IsPrimary)
|
||||
assert.WithinRange(ttt, domain.UpdatedAt, beforeSetPrimary, afterSetPrimary)
|
||||
}, retryDuration, tick)
|
||||
})
|
||||
|
||||
t.Run("test instance domain remove reduces", func(t *testing.T) {
|
||||
// Add a domain to the instance
|
||||
domainName := gofakeit.DomainName()
|
||||
_, err := instance.Client.InstanceV2Beta.AddCustomDomain(CTX, &v2beta.AddCustomDomainRequest{
|
||||
InstanceId: instance.Instance.Id,
|
||||
Domain: domainName,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
t.Cleanup(func() {
|
||||
_, err := instance.Client.InstanceV2Beta.RemoveCustomDomain(CTX, &v2beta.RemoveCustomDomainRequest{
|
||||
InstanceId: instance.Instance.Id,
|
||||
Domain: domainName,
|
||||
})
|
||||
if err != nil {
|
||||
t.Logf("Failed to delete instance domain on cleanup: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
// Wait for domain to be created and verify it exists
|
||||
retryDuration, tick = integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(ttt *assert.CollectT) {
|
||||
_, err := instanceDomainRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
instanceDomainRepo.InstanceIDCondition(instance.Instance.Id),
|
||||
instanceDomainRepo.DomainCondition(database.TextOperationEqual, domainName),
|
||||
),
|
||||
),
|
||||
)
|
||||
require.NoError(ttt, err)
|
||||
}, retryDuration, tick)
|
||||
|
||||
// Remove the domain
|
||||
_, err = SystemClient.RemoveDomain(CTX, &system.RemoveDomainRequest{
|
||||
InstanceId: instance.Instance.Id,
|
||||
Domain: domainName,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
// Test that domain remove reduces
|
||||
retryDuration, tick = integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(ttt *assert.CollectT) {
|
||||
domain, err := instanceDomainRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
instanceDomainRepo.InstanceIDCondition(instance.Instance.Id),
|
||||
instanceDomainRepo.DomainCondition(database.TextOperationEqual, domainName),
|
||||
),
|
||||
),
|
||||
)
|
||||
// event instance.domain.removed
|
||||
assert.Nil(ttt, domain)
|
||||
require.ErrorIs(ttt, err, new(database.NoRowFoundError))
|
||||
}, retryDuration, tick)
|
||||
})
|
||||
}
|
@@ -17,6 +17,8 @@ import (
|
||||
)
|
||||
|
||||
func TestServer_TestInstanceReduces(t *testing.T) {
|
||||
instanceRepo := repository.InstanceRepository(pool)
|
||||
|
||||
t.Run("test instance add reduces", func(t *testing.T) {
|
||||
instanceName := gofakeit.Name()
|
||||
beforeCreate := time.Now()
|
||||
@@ -33,8 +35,15 @@ func TestServer_TestInstanceReduces(t *testing.T) {
|
||||
afterCreate := time.Now()
|
||||
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
_, err = SystemClient.RemoveInstance(CTX, &system.RemoveInstanceRequest{
|
||||
InstanceId: instance.GetInstanceId(),
|
||||
})
|
||||
if err != nil {
|
||||
t.Logf("Failed to delete instance on cleanup: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
instanceRepo := repository.InstanceRepository(pool)
|
||||
retryDuration, tick := integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(ttt *assert.CollectT) {
|
||||
instance, err := instanceRepo.Get(CTX,
|
||||
@@ -71,6 +80,14 @@ func TestServer_TestInstanceReduces(t *testing.T) {
|
||||
},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
_, err = SystemClient.RemoveInstance(CTX, &system.RemoveInstanceRequest{
|
||||
InstanceId: res.GetInstanceId(),
|
||||
})
|
||||
if err != nil {
|
||||
t.Logf("Failed to delete instance on cleanup: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
instanceName += "new"
|
||||
beforeUpdate := time.Now()
|
||||
@@ -78,10 +95,9 @@ func TestServer_TestInstanceReduces(t *testing.T) {
|
||||
InstanceId: res.InstanceId,
|
||||
InstanceName: instanceName,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
afterUpdate := time.Now()
|
||||
require.NoError(t, err)
|
||||
|
||||
instanceRepo := repository.InstanceRepository(pool)
|
||||
retryDuration, tick := integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(ttt *assert.CollectT) {
|
||||
instance, err := instanceRepo.Get(CTX,
|
||||
@@ -108,8 +124,6 @@ func TestServer_TestInstanceReduces(t *testing.T) {
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
instanceRepo := repository.InstanceRepository(pool)
|
||||
|
||||
// check instance exists
|
||||
retryDuration, tick := integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(ttt *assert.CollectT) {
|
||||
|
@@ -19,25 +19,33 @@ import (
|
||||
|
||||
func TestServer_TestOrganizationReduces(t *testing.T) {
|
||||
instanceID := Instance.ID()
|
||||
orgRepo := repository.OrganizationRepository(pool)
|
||||
|
||||
t.Run("test org add reduces", func(t *testing.T) {
|
||||
beforeCreate := time.Now()
|
||||
orgName := gofakeit.Name()
|
||||
|
||||
_, err := OrgClient.CreateOrganization(CTX, &v2beta_org.CreateOrganizationRequest{
|
||||
org, err := OrgClient.CreateOrganization(CTX, &v2beta_org.CreateOrganizationRequest{
|
||||
Name: orgName,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
afterCreate := time.Now()
|
||||
|
||||
orgRepo := repository.OrganizationRepository(pool)
|
||||
t.Cleanup(func() {
|
||||
_, err = OrgClient.DeleteOrganization(CTX, &v2beta_org.DeleteOrganizationRequest{
|
||||
Id: org.GetId(),
|
||||
})
|
||||
if err != nil {
|
||||
t.Logf("Failed to delete organization on cleanup: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
retryDuration, tick := integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(tt *assert.CollectT) {
|
||||
organization, err := orgRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
orgRepo.NameCondition(orgName),
|
||||
orgRepo.IDCondition(org.GetId()),
|
||||
orgRepo.InstanceIDCondition(instanceID),
|
||||
),
|
||||
),
|
||||
@@ -63,6 +71,15 @@ func TestServer_TestOrganizationReduces(t *testing.T) {
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
t.Cleanup(func() {
|
||||
_, err = OrgClient.DeleteOrganization(CTX, &v2beta_org.DeleteOrganizationRequest{
|
||||
Id: organization.Id,
|
||||
})
|
||||
if err != nil {
|
||||
t.Logf("Failed to delete organization on cleanup: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
// 2. update org name
|
||||
beforeUpdate := time.Now()
|
||||
orgName = orgName + "_new"
|
||||
@@ -73,14 +90,12 @@ func TestServer_TestOrganizationReduces(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
afterUpdate := time.Now()
|
||||
|
||||
orgRepo := repository.OrganizationRepository(pool)
|
||||
|
||||
retryDuration, tick := integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(t *assert.CollectT) {
|
||||
organization, err := orgRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
orgRepo.NameCondition(orgName),
|
||||
orgRepo.IDCondition(organization.Id),
|
||||
orgRepo.InstanceIDCondition(instanceID),
|
||||
),
|
||||
),
|
||||
@@ -101,6 +116,15 @@ func TestServer_TestOrganizationReduces(t *testing.T) {
|
||||
Name: orgName,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
// Cleanup: delete the organization
|
||||
_, err = OrgClient.DeleteOrganization(CTX, &v2beta_org.DeleteOrganizationRequest{
|
||||
Id: organization.Id,
|
||||
})
|
||||
if err != nil {
|
||||
t.Logf("Failed to delete organization on cleanup: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
// 2. deactivate org name
|
||||
beforeDeactivate := time.Now()
|
||||
@@ -111,14 +135,12 @@ func TestServer_TestOrganizationReduces(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
afterDeactivate := time.Now()
|
||||
|
||||
orgRepo := repository.OrganizationRepository(pool)
|
||||
|
||||
retryDuration, tick := integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(t *assert.CollectT) {
|
||||
organization, err := orgRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
orgRepo.NameCondition(orgName),
|
||||
orgRepo.IDCondition(organization.Id),
|
||||
orgRepo.InstanceIDCondition(instanceID),
|
||||
),
|
||||
),
|
||||
@@ -126,7 +148,6 @@ func TestServer_TestOrganizationReduces(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
// event org.deactivate
|
||||
assert.Equal(t, orgName, organization.Name)
|
||||
assert.Equal(t, domain.OrgStateInactive, organization.State)
|
||||
assert.WithinRange(t, organization.UpdatedAt, beforeDeactivate, afterDeactivate)
|
||||
}, retryDuration, tick)
|
||||
@@ -140,6 +161,15 @@ func TestServer_TestOrganizationReduces(t *testing.T) {
|
||||
Name: orgName,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
// Cleanup: delete the organization
|
||||
_, err = OrgClient.DeleteOrganization(CTX, &v2beta_org.DeleteOrganizationRequest{
|
||||
Id: organization.Id,
|
||||
})
|
||||
if err != nil {
|
||||
t.Logf("Failed to delete organization on cleanup: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
// 2. deactivate org name
|
||||
_, err = OrgClient.DeactivateOrganization(CTX, &v2beta_org.DeactivateOrganizationRequest{
|
||||
@@ -154,14 +184,12 @@ func TestServer_TestOrganizationReduces(t *testing.T) {
|
||||
organization, err := orgRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
orgRepo.NameCondition(orgName),
|
||||
orgRepo.IDCondition(organization.Id),
|
||||
orgRepo.InstanceIDCondition(instanceID),
|
||||
),
|
||||
),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, orgName, organization.Name)
|
||||
assert.Equal(t, domain.OrgStateInactive, organization.State)
|
||||
}, retryDuration, tick)
|
||||
|
||||
@@ -178,7 +206,7 @@ func TestServer_TestOrganizationReduces(t *testing.T) {
|
||||
organization, err := orgRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
orgRepo.NameCondition(orgName),
|
||||
orgRepo.IDCondition(organization.Id),
|
||||
orgRepo.InstanceIDCondition(instanceID),
|
||||
),
|
||||
),
|
||||
@@ -201,24 +229,19 @@ func TestServer_TestOrganizationReduces(t *testing.T) {
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
// 2. check org retrivable
|
||||
// 2. check org retrievable
|
||||
orgRepo := repository.OrganizationRepository(pool)
|
||||
retryDuration, tick := integration.WaitForAndTickWithMaxDuration(CTX, time.Minute)
|
||||
assert.EventuallyWithT(t, func(t *assert.CollectT) {
|
||||
organization, err := orgRepo.Get(CTX,
|
||||
_, err := orgRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
orgRepo.NameCondition(orgName),
|
||||
orgRepo.IDCondition(organization.Id),
|
||||
orgRepo.InstanceIDCondition(instanceID),
|
||||
),
|
||||
),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
if organization == nil {
|
||||
assert.Fail(t, "this error is here because of a race condition")
|
||||
}
|
||||
assert.Equal(t, orgName, organization.Name)
|
||||
}, retryDuration, tick)
|
||||
|
||||
// 3. delete org
|
||||
@@ -232,7 +255,7 @@ func TestServer_TestOrganizationReduces(t *testing.T) {
|
||||
organization, err := orgRepo.Get(CTX,
|
||||
database.WithCondition(
|
||||
database.And(
|
||||
orgRepo.NameCondition(orgName),
|
||||
orgRepo.IDCondition(organization.Id),
|
||||
orgRepo.InstanceIDCondition(instanceID),
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user