test: add sink functionality for idp intents (#9116)

# Which Problems Are Solved

New integration tests can't use command side to simulate successful
intents.

# How the Problems Are Solved

Add endpoints to only in integration tests available sink to create
already successful intents.

# Additional Changes

None

# Additional Context

Closes #8557

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Stefan Benz
2025-02-20 13:27:20 +01:00
committed by GitHub
parent 9b35b98cae
commit 93466055ee
9 changed files with 333 additions and 139 deletions

View File

@@ -143,10 +143,6 @@ type Server struct {
func startZitadel(ctx context.Context, config *Config, masterKey string, server chan<- *Server) error {
showBasicInformation(config)
// sink Server is stubbed out in production builds, see function's godoc.
closeSink := sink.StartServer()
defer closeSink()
i18n.MustLoadSupportedLanguagesFromDir()
dbClient, err := database.Connect(config.Database, false)
@@ -254,6 +250,10 @@ func startZitadel(ctx context.Context, config *Config, masterKey string, server
}
defer commands.Close(ctx) // wait for background jobs
// sink Server is stubbed out in production builds, see function's godoc.
closeSink := sink.StartServer(commands)
defer closeSink()
clock := clockpkg.New()
actionsExecutionStdoutEmitter, err := logstore.NewEmitter[*record.ExecutionLog](ctx, clock, &logstore.EmitterConfig{Enabled: config.LogStore.Execution.Stdout.Enabled}, stdout.NewStdoutEmitter[*record.ExecutionLog]())
if err != nil {