fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! added first event

This commit is contained in:
Iraq Jaber
2025-08-11 10:15:55 +01:00
parent a0ef9c0bd2
commit 2dc44031b6
5 changed files with 15 additions and 11 deletions

View File

@@ -29,7 +29,7 @@ var (
SystemClient system.SystemServiceClient
OrgClient v2beta_org.OrganizationServiceClient
AdminClient admin.AdminServiceClient
MgmtClient mgmt.ManagementServiceClient
MgmtClient mgmt.ManagementServiceClient
)
var pool database.Pool

View File

@@ -9,6 +9,7 @@ import (
"github.com/brianvoe/gofakeit/v6"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
durationpb "google.golang.org/protobuf/types/known/durationpb"
"github.com/zitadel/zitadel/backend/v3/domain"
"github.com/zitadel/zitadel/backend/v3/storage/database"
@@ -18,7 +19,6 @@ import (
"github.com/zitadel/zitadel/pkg/grpc/admin"
"github.com/zitadel/zitadel/pkg/grpc/idp"
idp_grpc "github.com/zitadel/zitadel/pkg/grpc/idp"
durationpb "google.golang.org/protobuf/types/known/durationpb"
)
var validSAMLMetadata1 = []byte(`<?xml version="1.0" encoding="UTF-8"?>

View File

@@ -5,11 +5,11 @@ import (
"testing"
"time"
"github.com/muhlemmer/gu"
"github.com/brianvoe/gofakeit/v6"
"github.com/muhlemmer/gu"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/zitadel/zitadel/backend/v3/domain"
"github.com/zitadel/zitadel/backend/v3/storage/database"
"github.com/zitadel/zitadel/backend/v3/storage/database/repository"
@@ -175,7 +175,7 @@ func TestCreateIDProvider(t *testing.T) {
State: domain.OrgStateActive.String(),
}
organizationRepo := repository.OrganizationRepository(pool)
err = organizationRepo.Create(t.Context(), &org)
err = organizationRepo.Create(ctx, &org)
require.NoError(t, err)
idpRepo := repository.IDProviderRepository(pool)
@@ -876,6 +876,10 @@ func TestGetIDProvider(t *testing.T) {
}
}
// gocognit linting fails due to number of test cases
// and the fact that each test case has a testFunc()
//
//nolint:gocognit
func TestListIDProvider(t *testing.T) {
ctx := t.Context()
pool, stop, err := newEmbeddedDB(ctx)
@@ -944,7 +948,7 @@ func TestListIDProvider(t *testing.T) {
State: domain.OrgStateActive.String(),
}
organizationRepo := repository.OrganizationRepository(pool)
err = organizationRepo.Create(t.Context(), &org)
err = organizationRepo.Create(ctx, &org)
require.NoError(t, err)
// create idp
@@ -1008,7 +1012,7 @@ func TestListIDProvider(t *testing.T) {
State: domain.OrgStateActive.String(),
}
organizationRepo := repository.OrganizationRepository(pool)
err = organizationRepo.Create(t.Context(), &org)
err = organizationRepo.Create(ctx, &org)
require.NoError(t, err)
// create idp
@@ -1670,7 +1674,7 @@ func TestListIDProvider(t *testing.T) {
require.NoError(t, err)
})
ctx := t.Context()
ctx := context.WithoutCancel(t.Context())
idps := tt.testFunc(ctx, t)