Skip to content

Commit 1bec71d

Browse files
authored
Cleanup old .golangci test file, remove lint exlusion (#2831)
1 parent f68bff0 commit 1bec71d

File tree

6 files changed

+11
-29
lines changed

6 files changed

+11
-29
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ issues:
3737
- path: pkg/tests
3838
linters:
3939
- lll
40-
- paralleltest
4140
- path: pkg/pf/tests
4241
linters:
4342
- lll

pkg/tests/.golangci.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

pkg/tests/acc_provider_config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/testutil"
2424
)
2525

26-
func TestAccProviderConfig(t *testing.T) {
26+
func TestAccProviderConfig(t *testing.T) { //nolint:paralleltest // integration.ProgramTest already is parallel
2727
opts := accTestOptions(t).With(integration.ProgramTestOptions{
2828
Dir: "provider-config",
2929
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {

pkg/tests/acc_secrets_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/info"
3333
)
3434

35-
func TestAccProviderSecrets(t *testing.T) {
35+
func TestAccProviderSecrets(t *testing.T) { //nolint:paralleltest // [integration.ProgramTest] already calls t.Parallel
3636
opts := accTestOptions(t).With(integration.ProgramTestOptions{
3737
Dir: "provider-secrets",
3838

@@ -63,6 +63,8 @@ func TestAccProviderSecrets(t *testing.T) {
6363
// This tests exercise the bridge and Pulumi CLI together intentionally as secret handling for nested properties
6464
// historically had some quirks in the Pulumi CLI.
6565
func TestAccProviderConfigureSecrets(t *testing.T) {
66+
t.Parallel()
67+
6668
type configSetter func(ctx context.Context, t *testing.T, stack *auto.Stack, basePath string, secret bool)
6769

6870
type primType struct {
@@ -423,6 +425,8 @@ func TestAccProviderConfigureSecrets(t *testing.T) {
423425

424426
for _, tc := range testCases {
425427
t.Run(tc.name, func(t *testing.T) {
428+
t.Parallel()
429+
426430
ctx := context.Background()
427431
res := &schema.Resource{
428432
Schema: map[string]*schema.Schema{

pkg/tests/diff_test/detailed_diff_unknown_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,8 @@ resources:
669669
})
670670

671671
t.Run("update preview", func(t *testing.T) {
672-
t.Parallel()
673672
t.Skipf("Skipping this test as it this case is not handled by the TF plugin sdk")
673+
t.Parallel()
674674
// The TF plugin SDK does not handle removing an input for a computed value, even if the provider implements it.
675675
// The plugin SDK always fills an empty Computed property with the value from the state.
676676
// Diff in these cases always returns no diff and the old state value is used.

pkg/tests/main_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ func TestMain(m *testing.M) {
3434
if err := setupIntegrationTests(); err != nil {
3535
log.Fatal(err)
3636
}
37+
err := os.Setenv("PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION", "true")
38+
if err != nil {
39+
os.Exit(1)
40+
}
3741

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

0 commit comments

Comments
 (0)