pulumi/pkg/backend/httpstate
Thomas Gummerer fc10da33d9
Add display to the engine tests (#16050)
We want to add more test coverage to the display code. The best way to
do that is to add it to the engine tests, that already cover most of the
pulumi functionality.

It's probably not really possible to review all of the output, but at
least it gives us a baseline, which we can work with.

There's a couple of tests that are flaky for reasons I don't quite
understand yet. I marked them as to skip and we can look at them later.
I'd rather get in the baseline tests sooner, rather than spending a
bunch of time looking at that. The output differences also seem very
minor, so not super concerning.

The biggest remaining issue is that this doesn't interact well with the
Chdir we're doing in the engine. We could either pass the CWD through,
or just try to get rid of that Chdir. So this should only be merged
after https://github.com/pulumi/pulumi/pull/15607.

I've tried to split this into a few commits, separating out adding the
testdata, so it's hopefully a little easier to review, even though the
PR is still quite large.

One other thing to note is that we're comparing that the output has all
the same lines, and not that it is exactly the same. Because of how the
engine is implemented, there's a bunch of race conditions otherwise,
that would make us have to skip a bunch of tests, just because e.g.
resource A is sometimes deleted before resource B and sometimes it's the
other way around.

The biggest downside of that is that running with `PULUMI_ACCEPT` will
produce a diff even when there are no changes. Hopefully we won't have
to run that way too often though, so it might not be a huge issue?

---------

Co-authored-by: Fraser Waters <fraser@pulumi.com>
2024-05-13 07:18:25 +00:00
..
client Use new API for deployments (#15684) 2024-04-16 23:23:56 +00:00
testdata [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
backend.go Report snapshot write errors as actual errors (#16090) 2024-04-30 17:23:18 +00:00
backend_test.go Support always qualifying stack names (#11081) (#15857) 2024-04-04 10:11:46 +00:00
console.go Add support for a PULUMI_CONSOLE_DOMAIN env var (#4410) 2020-04-17 11:50:00 -07:00
console_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
diffs.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
diffs_post_1.20.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
diffs_pre_1.20.go [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
environments.go [cli] Include config from ESC in `pulumi config` (#14560) 2023-11-21 10:44:45 +00:00
mock.go Pass in a header to indicate where the deployment initiated (#15468) 2024-02-20 04:00:01 +00:00
policypack.go improve display for policy packs (#15186) 2024-01-19 13:40:24 +00:00
snapshot.go Lift context parameter to SerializeDeployment/Resource/Operations/Properties (#15929) 2024-04-15 07:45:46 +00:00
snapshot_test.go Add display to the engine tests (#16050) 2024-05-13 07:18:25 +00:00
stack.go Support always qualifying stack names (#11081) (#15857) 2024-04-04 10:11:46 +00:00
state.go Run integration tests with race detection (#15895) 2024-04-11 15:58:42 +00:00
token_source.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
token_source_test.go Use context.Background in tests (#14029) 2023-09-25 12:25:26 +00:00