mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 15:17:33 +00:00
fixup! fixup! feat(idp_table_relational): adding inital idp tables for relational repository
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
|||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/zitadel/logging"
|
"github.com/zitadel/logging"
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rp"
|
"github.com/zitadel/oidc/v3/pkg/client/rp"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
||||||
|
@@ -42,6 +42,7 @@ const (
|
|||||||
OIDCMappingFieldPreferredLoginName
|
OIDCMappingFieldPreferredLoginName
|
||||||
OIDCMappingFieldEmail
|
OIDCMappingFieldEmail
|
||||||
// count is for validation purposes
|
// count is for validation purposes
|
||||||
|
//nolint: unused
|
||||||
oidcMappingFieldCount
|
oidcMappingFieldCount
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -5,11 +5,11 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/muhlemmer/gu"
|
|
||||||
|
|
||||||
"github.com/brianvoe/gofakeit/v6"
|
"github.com/brianvoe/gofakeit/v6"
|
||||||
|
"github.com/muhlemmer/gu"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/zitadel/zitadel/backend/v3/domain"
|
"github.com/zitadel/zitadel/backend/v3/domain"
|
||||||
"github.com/zitadel/zitadel/backend/v3/storage/database"
|
"github.com/zitadel/zitadel/backend/v3/storage/database"
|
||||||
"github.com/zitadel/zitadel/backend/v3/storage/database/repository"
|
"github.com/zitadel/zitadel/backend/v3/storage/database/repository"
|
||||||
@@ -173,7 +173,7 @@ func TestCreateIDProvider(t *testing.T) {
|
|||||||
State: domain.OrgStateActive.String(),
|
State: domain.OrgStateActive.String(),
|
||||||
}
|
}
|
||||||
organizationRepo := repository.OrganizationRepository(pool)
|
organizationRepo := repository.OrganizationRepository(pool)
|
||||||
err = organizationRepo.Create(t.Context(), &org)
|
err = organizationRepo.Create(ctx, &org)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
idpRepo := repository.IDProviderRepository(pool)
|
idpRepo := repository.IDProviderRepository(pool)
|
||||||
@@ -941,7 +941,7 @@ func TestListIDProvider(t *testing.T) {
|
|||||||
State: domain.OrgStateActive.String(),
|
State: domain.OrgStateActive.String(),
|
||||||
}
|
}
|
||||||
organizationRepo := repository.OrganizationRepository(pool)
|
organizationRepo := repository.OrganizationRepository(pool)
|
||||||
err = organizationRepo.Create(t.Context(), &org)
|
err = organizationRepo.Create(ctx, &org)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
// create idp
|
// create idp
|
||||||
@@ -1005,7 +1005,7 @@ func TestListIDProvider(t *testing.T) {
|
|||||||
State: domain.OrgStateActive.String(),
|
State: domain.OrgStateActive.String(),
|
||||||
}
|
}
|
||||||
organizationRepo := repository.OrganizationRepository(pool)
|
organizationRepo := repository.OrganizationRepository(pool)
|
||||||
err = organizationRepo.Create(t.Context(), &org)
|
err = organizationRepo.Create(ctx, &org)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
// create idp
|
// create idp
|
||||||
@@ -1666,7 +1666,7 @@ func TestListIDProvider(t *testing.T) {
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
})
|
})
|
||||||
|
|
||||||
ctx := t.Context()
|
ctx := context.WithoutCancel(t.Context())
|
||||||
|
|
||||||
idps := tt.testFunc(ctx, t)
|
idps := tt.testFunc(ctx, t)
|
||||||
|
|
||||||
|
@@ -29,4 +29,4 @@ func (mig *TransactionalTables) String() string {
|
|||||||
|
|
||||||
func (mig *TransactionalTables) Check(lastRun map[string]interface{}) bool {
|
func (mig *TransactionalTables) Check(lastRun map[string]interface{}) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,7 @@ func (s *Server) ListInstanceDomains(ctx context.Context, req *admin_pb.ListInst
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return &admin_pb.ListInstanceDomainsResponse{
|
return &admin_pb.ListInstanceDomainsResponse{
|
||||||
Result: instance_grpc.DomainsToPb(domains.Domains),
|
Result: instance_grpc.DomainsToPb(domains.Domains),
|
||||||
SortingColumn: req.SortingColumn,
|
SortingColumn: req.SortingColumn,
|
||||||
Details: object.ToListDetails(
|
Details: object.ToListDetails(
|
||||||
domains.Count,
|
domains.Count,
|
||||||
@@ -49,7 +49,7 @@ func (s *Server) ListInstanceTrustedDomains(ctx context.Context, req *admin_pb.L
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return &admin_pb.ListInstanceTrustedDomainsResponse{
|
return &admin_pb.ListInstanceTrustedDomainsResponse{
|
||||||
Result: instance_grpc.TrustedDomainsToPb(domains.Domains),
|
Result: instance_grpc.TrustedDomainsToPb(domains.Domains),
|
||||||
SortingColumn: req.SortingColumn,
|
SortingColumn: req.SortingColumn,
|
||||||
Details: object.ToListDetails(
|
Details: object.ToListDetails(
|
||||||
domains.Count,
|
domains.Count,
|
||||||
|
@@ -2,6 +2,7 @@ package command
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/zitadel/logging"
|
"github.com/zitadel/logging"
|
||||||
|
|
||||||
"github.com/zitadel/zitadel/internal/domain"
|
"github.com/zitadel/zitadel/internal/domain"
|
||||||
|
Reference in New Issue
Block a user