Files
zitadel/internal/api/grpc/management/integration_test/server_test.go
Iraq dbe0bdbe73 fix(api): fix for ListAppKeys() not returning app keys (#10465)
# Which Problems Are Solved

`ListAppKeys()` does not work properly, in that it does not return any
app keys.

# How the Problems Are Solved

The issue stems from a mistake SQL query not joining the
`projections.authn_keys2` table to `projections.projects4` instead of
joining to `projections.apps7`

# Additional Changes

`ListAppKeys()` returns the app key IDs in order of their creation

- Closes https://github.com/zitadel/zitadel/issues/10420
- backport to v4.x

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
(cherry picked from commit a637ae5aa5)
2025-08-15 15:20:40 +02:00

34 lines
761 B
Go

//go:build integration
package management_test
import (
"context"
"os"
"testing"
"time"
"github.com/zitadel/zitadel/internal/integration"
mgmt_pb "github.com/zitadel/zitadel/pkg/grpc/management"
)
var (
CTX, IAMOwnerCTX, OrgCTX context.Context
Instance *integration.Instance
Client mgmt_pb.ManagementServiceClient
)
func TestMain(m *testing.M) {
os.Exit(func() int {
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Minute)
defer cancel()
Instance = integration.NewInstance(ctx)
CTX = ctx
IAMOwnerCTX = Instance.WithAuthorization(ctx, integration.UserTypeIAMOwner)
OrgCTX = Instance.WithAuthorization(ctx, integration.UserTypeOrgOwner)
Client = Instance.Client.Mgmt
return m.Run()
}())
}