This message was deleted.
# general
s
This message was deleted.
m
Can you describe your test constraints in a bit more detail? (I’m initially wondering why something like just running your tests literally after the
pulumi
program exits with a status code of
0
doesn’t suffice.)
i
We use the objects created in the 'pulumi up' in our tests. So we can't just run them in a following command.
And yes, I wish we could.
Running them in the 'pulumi up' is the approach recommended by Pulumi.
w
`process.on(
exit
, ...)` is one reliable way to run code after all Pulumi resources have been created/updated (or at least everything that will be updated in case a failure causes things to exit early). Does that work for you?
Though I’m still interested in the general pattern here. Pulumi programs typically use
apply
to register work the is dependent on resources being updated or created. Why doesn’t that work for your case?
i
eks_cluster.apply(i = create_alb();r = create_route53(i)); i.apply(test i); r.apply(test r);
the tests have to be layered behind applies to keep them from executing.
and a one-layer apply doesn't work. i.apply fires before i has been completed. so I need i.apply(i.some_property.apply())
and process.on won't work since you can only perform synchronous actions. at least i think so
w
i
sounds reasonable - i'll give it a shot - thanks
That works perfectly. I strongly suggest you make that the Pulumi recommendation for running integration tests.