pulumi/tests
Joe Duffy 0a38bc295c
Fix issue with --target deletion dependent calculation (#8360)
* Fix issue with --target deletion dependant calculation

The code that computed --target deletion dependants was not correct.
It used parent/child component relationships, but did not respect actual
DAG dependencies. As a result, it could erroneously leave hanging
references to resources that no longer exist after performing a
`pulumi destroy --target X` operation. This manifested in bugs like
https://github.com/pulumi/pulumi/issues/6283, which is fixed by this
change. The solution is to compute the (transitive!) dependency graph
correctly, factoring in both parent/child, as well as explicit and
implicit, dependencies. The existing logic does the correct thing once
we do this. I've also added tests for this area, including regression
tests that cover transitive dependency relationships, as well as ones
that would cause an infinite loop given a naive implementation.

* Add a changelog entry

* Fix failing test to include all destroyed targets

Unless I'm missing something, the entire tree should be deleted
in this test case because A is the ancestor for the entire tree.

* Use DependencyGraph to compute dependents

Per code review feedback from @pgavlin.

Co-authored-by: Anton Tayanovskyy <anton@pulumi.com>
2021-11-12 10:02:51 -05:00
..
examples Use provider.MainWithOptions to reduce boilerplate in integration tests (#7684) 2021-07-30 06:31:17 -07:00
integration Fix issue with --target deletion dependent calculation (#8360) 2021-11-12 10:02:51 -05:00
testprovider Initial support for resource methods (authoring from Node.js, calling from Python) (#7363) 2021-06-30 07:48:56 -07:00
about_test.go Whitespace and grammer 2021-08-30 18:56:02 -07:00
config_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
go.mod Update pkg -> sdk dependency for 3.17.1 (#8391) 2021-11-09 16:54:45 -05:00
go.sum Fix cmdutil.PrintTable to handle ansi escapes and non-byte glyphs (#8344) 2021-11-04 10:06:20 +00:00
history_test.go [cli] Removing the deprecated pulumi history command (#6724) 2021-04-14 19:32:18 +01:00
login_test.go fixup linting errors after rebase of master -> feature-3.0 (#6766) 2021-04-14 19:32:18 +01:00
main_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
README.md Update tests and add integration test 2021-08-24 14:29:27 -07:00
stack_test.go Workaround flaky TestLocalStateLocking 7710 (#7730) 2021-08-11 16:50:03 -04:00

Integration Tests

This module provides integration tests for the Pulumi CLI.

The tests can be run via:

make test_all