Skip to content

Commit ef51f8f

Browse files
committed
wip
1 parent 7f79d86 commit ef51f8f

15 files changed

+35
-21
lines changed

.github/workflows/testacc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Terraform Provider testing workflow.
2-
name: Build
2+
name: Acceptance Tests
33

44
# This GitHub action runs your tests for each pull request and push.
55
# Optionally, you can turn it on using a schedule for regular testing.

internal/clients/utils_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package clients_test
22

33
import (
44
"context"
5-
"github.com/stretchr/testify/assert"
65
"net/http"
76
"net/url"
87
"testing"
98

9+
"github.com/stretchr/testify/assert"
10+
1011
"github.com/astronomer/astronomer-terraform-provider/internal/clients"
1112
)
1213

internal/provider/datasources/data_source_organization_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package datasources_test
22

33
import (
4-
astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
54
"os"
65
"testing"
76

7+
astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
8+
89
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
910
)
1011

internal/provider/datasources/data_source_workspace_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package datasources_test
22

33
import (
44
"fmt"
5+
"testing"
6+
57
astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
68
"github.com/astronomer/astronomer-terraform-provider/internal/utils"
7-
"testing"
89

910
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1011
)

internal/provider/datasources/data_source_workspaces_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ package datasources_test
22

33
import (
44
"fmt"
5+
"strconv"
6+
"testing"
7+
58
astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
69
"github.com/astronomer/astronomer-terraform-provider/internal/utils"
710
"github.com/hashicorp/terraform-plugin-testing/terraform"
811
"github.com/lucsky/cuid"
9-
"strconv"
10-
"testing"
1112

1213
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1314
)

internal/provider/provider.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package provider
22

33
import (
44
"context"
5+
"os"
6+
57
"github.com/astronomer/astronomer-terraform-provider/internal/clients/iam"
68
"github.com/astronomer/astronomer-terraform-provider/internal/clients/platform"
79
"github.com/astronomer/astronomer-terraform-provider/internal/provider/datasources"
@@ -16,7 +18,6 @@ import (
1618
"github.com/hashicorp/terraform-plugin-framework/resource"
1719
"github.com/hashicorp/terraform-plugin-framework/types"
1820
"github.com/hashicorp/terraform-plugin-log/tflog"
19-
"os"
2021
)
2122

2223
// Ensure AstronomerProvider satisfies various provider interfaces.

internal/provider/provider_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ package provider_test
33
import (
44
"context"
55
"fmt"
6+
"os"
7+
"regexp"
8+
"testing"
9+
610
astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
711
"github.com/hashicorp/terraform-plugin-framework/provider"
812
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
913
"github.com/hashicorp/terraform-plugin-go/tftypes"
1014
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1115
"github.com/lucsky/cuid"
1216
"github.com/stretchr/testify/assert"
13-
"os"
14-
"regexp"
15-
"testing"
1617
)
1718

1819
func TestUnit_Provider(t *testing.T) {

internal/provider/provider_test_utils.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package provider
22

33
import (
44
"fmt"
5-
"github.com/hashicorp/terraform-plugin-framework/providerserver"
6-
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
75
"os"
86
"testing"
7+
8+
"github.com/hashicorp/terraform-plugin-framework/providerserver"
9+
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
910
)
1011

1112
// TestAccProtoV6ProviderFactories are used to instantiate a provider during

internal/provider/resources/resource_workspace_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ package resources_test
33
import (
44
"context"
55
"fmt"
6+
"os"
7+
"testing"
8+
69
"github.com/astronomer/astronomer-terraform-provider/internal/clients/platform"
710
astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
811
"github.com/astronomer/astronomer-terraform-provider/internal/utils"
912
"github.com/hashicorp/terraform-plugin-testing/config"
1013
"github.com/hashicorp/terraform-plugin-testing/plancheck"
1114
"github.com/hashicorp/terraform-plugin-testing/terraform"
1215
"github.com/stretchr/testify/assert"
13-
"os"
14-
"testing"
1516

1617
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1718
)

internal/provider/schemas/provider.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package schemas
22

33
import (
4+
"regexp"
5+
46
"github.com/astronomer/astronomer-terraform-provider/internal/provider/validators"
57
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
68
"github.com/hashicorp/terraform-plugin-framework/provider/schema"
79
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
8-
"regexp"
910
)
1011

1112
func ProviderSchemaAttributes() map[string]schema.Attribute {

internal/provider/schemas/subject_profile_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package schemas_test
22

33
import (
44
"context"
5-
"github.com/stretchr/testify/assert"
65
"testing"
76

7+
"github.com/stretchr/testify/assert"
8+
89
"github.com/astronomer/astronomer-terraform-provider/internal/provider/schemas"
910

1011
"github.com/astronomer/astronomer-terraform-provider/internal/clients/iam"

internal/provider/validators/is_cuid_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
package validators_test
22

33
import (
4+
"testing"
5+
46
"github.com/astronomer/astronomer-terraform-provider/internal/provider/validators"
57
"github.com/hashicorp/terraform-plugin-framework/attr"
68
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
79
"github.com/hashicorp/terraform-plugin-framework/types"
810
"github.com/lucsky/cuid"
911
"github.com/samber/lo"
1012
"github.com/stretchr/testify/assert"
11-
"testing"
1213
)
1314

1415
func TestUnit_Validators_ListIsCuids(t *testing.T) {

internal/utils/errors_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package utils_test
22

33
import (
44
"context"
5-
"github.com/stretchr/testify/assert"
65
"testing"
76

7+
"github.com/stretchr/testify/assert"
8+
89
"github.com/astronomer/astronomer-terraform-provider/internal/utils"
910
"github.com/hashicorp/terraform-plugin-framework/datasource"
1011
"github.com/hashicorp/terraform-plugin-framework/resource"

internal/utils/list_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ package utils_test
33
import (
44
"context"
55
"fmt"
6+
"testing"
7+
68
"github.com/astronomer/astronomer-terraform-provider/internal/provider/models"
79
"github.com/astronomer/astronomer-terraform-provider/internal/provider/schemas"
810
"github.com/hashicorp/terraform-plugin-framework/attr"
911
"github.com/hashicorp/terraform-plugin-framework/diag"
1012
"github.com/hashicorp/terraform-plugin-framework/types"
1113
"github.com/stretchr/testify/assert"
12-
"testing"
1314

1415
"github.com/astronomer/astronomer-terraform-provider/internal/utils"
1516
)

internal/utils/test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package utils
22

33
import (
44
"fmt"
5-
"github.com/astronomer/astronomer-terraform-provider/internal/clients/platform"
6-
"github.com/hashicorp/terraform-plugin-testing/helper/acctest"
75
"os"
86
"strings"
7+
8+
"github.com/astronomer/astronomer-terraform-provider/internal/clients/platform"
9+
"github.com/hashicorp/terraform-plugin-testing/helper/acctest"
910
)
1011

1112
var platformClient *platform.ClientWithResponses

0 commit comments

Comments
 (0)