pulumi/tests
bors[bot] 57411d762c
Merge #13588 #13596
13588: A few fixes for `pulumi logs` r=lukehoban a=lukehoban

While many of the most fundamental limitations of `pulumi logs` are still dependent on moving this code out of pulumi/pulumi and into pulumi/pulumi-aws and other resource providers (https://github.com/pulumi/pulumi/issues/608), this PR implements a few more tactical fixes which improve some common scenarios.

Unfortunately, this whole area of the code is largely untested, in part because we didn't want to add a dependency on AWS in this layer (yet another reason we really want to do https://github.com/pulumi/pulumi/issues/608).  We could choose to further violate this layering and add tests here that use `pulumi-aws` to deploy Pulumi resources and then test them against this AWS operations provider.

In the meantime, I have manually validated fixes for the following issues.
    
Fixes #2665.
Fixes #1926.
Fixes #3947.
Fixes #1828.



13596: test(regress-13301): Avoid accidental tidying r=abhinav a=abhinav

The regression test for #13301 needs an intentionally bad go.mod file.
This file was excluded from `make tidy`, allowing it to remain invalid,
but this doesn't protect it from bulk commands like the following
used in #13593

```bash
find . -name go.mod -exec dirname '{}' ';' | while read R; do
  (cd "$R" && ... && go mod tidy)
done
```

In fact, #13593 accidentally tidied this go.mod file
(removing the extraneous dependencies critical to the regression test)
and failed in CI.

To prevent issues like this, rename the go.mod to go.mod.bad,
and rename it back to go.mod in the test environment at test time.

This also lets us revert the `make tidy` exclusion support in tidy.sh.


Co-authored-by: Luke Hoban <lukehoban@gmail.com>
Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
2023-07-27 16:30:02 +00:00
..
benchmarks/go-alias-norm deps(go): Upgrade to grpc 1.56.1 2023-07-06 09:04:16 -07:00
examples PR feedback 2023-07-06 20:40:23 -07:00
integration test(regress-13301): Avoid accidental tidying 2023-07-26 13:05:31 -07:00
testdata Make convert more lenient 2023-06-08 11:14:31 +01:00
testprovider all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
.gitignore ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
README.md Rename "Smoke" test to "Acceptance" tests 2023-01-30 15:38:37 -05:00
about_test.go test: fix regex used to test Go version output in about command. (#10499) 2022-08-29 11:53:03 -07:00
config_test.go filestate: Re-add project support 2023-03-31 13:21:36 -07:00
go.mod chore: post-release go.mod updates 2023-07-26 19:28:47 +00:00
go.sum Add `pulumi state edit` utility. 2023-07-17 09:47:05 -07:00
history_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
login_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08: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
remote_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
roundtrip_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
smoke_test.go Skip tests that are getting rate limited 2023-06-27 11:44:13 +02:00
stack_test.go `pulumi new -s 'org/project/stack'` checks the proper organization for project existence rather than backend.currentUser()'s org. 2023-07-03 09:28:52 -07:00

README.md

Integration Tests

This module provides integration tests for the Pulumi CLI.

The tests can be run via:

make test_all

Usage of Go build tags

In order to speed up integration tests in GitHub actions, Go build tags are used to conditionally compile the desired test cases.

// integration_nodejs_test.go
//go:build (nodejs || all) && !xplatform-acceptance

// integration_nodejs_acceptance_test.go
//go:build nodejs || all