From b00da5954263042f548c5762bf81343ae734bf2b Mon Sep 17 00:00:00 2001 From: Martin Gencur Date: Tue, 17 Dec 2024 14:03:09 +0100 Subject: [PATCH] Register eventshub image for JobSink (#8390) The package must be registered so that ImageProducer can map it to the right image and replace it in the final yaml. --- test/rekt/resources/jobsink/jobsink.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/rekt/resources/jobsink/jobsink.go b/test/rekt/resources/jobsink/jobsink.go index 22d8c4b1da6..42804ebeb91 100644 --- a/test/rekt/resources/jobsink/jobsink.go +++ b/test/rekt/resources/jobsink/jobsink.go @@ -73,6 +73,9 @@ func Install(name string, opts ...manifest.CfgFn) feature.StepFn { fn(cfg) } + if err := registerImage(ctx); err != nil { + t.Fatal(err) + } if _, err := manifest.InstallYamlFS(ctx, yamlEmbed, cfg); err != nil { t.Fatal(err) } @@ -223,3 +226,10 @@ func GoesReadySimple(name string) *feature.Feature { return f } + +func registerImage(ctx context.Context) error { + im := eventshub.ImageFromContext(ctx) + reg := environment.RegisterPackage(im) + _, err := reg(ctx, environment.FromContext(ctx)) + return err +}