Skip to content

Commit

Permalink
Cleanup test lints
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Jan 14, 2025
1 parent f68bff0 commit 5d97611
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 28 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ issues:
- path: pkg/tests
linters:
- lll
- paralleltest
- path: pkg/pf/tests
linters:
- lll
Expand Down
25 changes: 0 additions & 25 deletions pkg/tests/.golangci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/tests/acc_provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/testutil"
)

func TestAccProviderConfig(t *testing.T) {
func TestAccProviderConfig(t *testing.T) { //nolint:paralleltest // integration.ProgramTest already is parallel
opts := accTestOptions(t).With(integration.ProgramTestOptions{
Dir: "provider-config",
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
Expand Down
5 changes: 5 additions & 0 deletions pkg/tests/acc_secrets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
)

func TestAccProviderSecrets(t *testing.T) {
t.Parallel()
opts := accTestOptions(t).With(integration.ProgramTestOptions{
Dir: "provider-secrets",

Expand Down Expand Up @@ -63,6 +64,8 @@ func TestAccProviderSecrets(t *testing.T) {
// This tests exercise the bridge and Pulumi CLI together intentionally as secret handling for nested properties
// historically had some quirks in the Pulumi CLI.
func TestAccProviderConfigureSecrets(t *testing.T) {
t.Parallel()

type configSetter func(ctx context.Context, t *testing.T, stack *auto.Stack, basePath string, secret bool)

type primType struct {
Expand Down Expand Up @@ -423,6 +426,8 @@ func TestAccProviderConfigureSecrets(t *testing.T) {

for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

ctx := context.Background()
res := &schema.Resource{
Schema: map[string]*schema.Schema{
Expand Down
2 changes: 1 addition & 1 deletion pkg/tests/diff_test/detailed_diff_unknown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,8 @@ resources:
})

t.Run("update preview", func(t *testing.T) {
t.Parallel()
t.Skipf("Skipping this test as it this case is not handled by the TF plugin sdk")
t.Parallel()
// The TF plugin SDK does not handle removing an input for a computed value, even if the provider implements it.
// The plugin SDK always fills an empty Computed property with the value from the state.
// Diff in these cases always returns no diff and the old state value is used.
Expand Down
4 changes: 4 additions & 0 deletions pkg/tests/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func TestMain(m *testing.M) {
if err := setupIntegrationTests(); err != nil {
log.Fatal(err)
}
err := os.Setenv("PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION", "true")
if err != nil {
os.Exit(1)
}

exitCode := m.Run()
fmt.Fprintf(os.Stderr, "test main exited with code %d\n", exitCode)
Expand Down

0 comments on commit 5d97611

Please sign in to comment.