stocky-ram-12506
07/31/2026, 9:43 PMstocky-ram-12506
07/31/2026, 10:14 PMnil. If I remove the hook entirely, the tests pass no problem. But just having one in there that prints "hello world" causes a panic like this:
panic: not implemented
goroutine 88 [running]:
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*mockMonitor).RegisterResourceHook(0x237ccd1c81b0|github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*mockMonitor).RegisterResourceHook(0x237ccd1c81b0>?, {0x39e5828?, 0x237cccf1d8f0?}, 0x0?, {0x285dd40?, 0x237ccca94eb8?, 0x0?})
/home/rvoxi/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.253.0/go/pulumi/mocks.go:397 +0x25
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*Context).RegisterResourceHook.func1()|github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*Context).RegisterResourceHook.func1()>
/home/rvoxi/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.253.0/go/pulumi/context.go:3013 +0x105
created by <http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*Context).RegisterResourceHook|github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*Context).RegisterResourceHook> in goroutine 86
/home/rvoxi/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.253.0/go/pulumi/context.go:2995 +0xc9
The docs say that hooks are ignored by the mock engine. That's fine, I'm not testing for what's inside the hook (my program does not crash if "hello world" is not printed), but my program can't pass a unit test unless I completely comment it out, and remove it entirely from the pulumi resource options of the resource its for.echoing-dinner-19531
08/01/2026, 3:05 AM