Commit ef51f8f 1 parent 7f79d86 commit ef51f8f Copy full SHA for ef51f8f
File tree 15 files changed +35
-21
lines changed
15 files changed +35
-21
lines changed Original file line number Diff line number Diff line change 1
1
# Terraform Provider testing workflow.
2
- name : Build
2
+ name : Acceptance Tests
3
3
4
4
# This GitHub action runs your tests for each pull request and push.
5
5
# Optionally, you can turn it on using a schedule for regular testing.
Original file line number Diff line number Diff line change @@ -2,11 +2,12 @@ package clients_test
2
2
3
3
import (
4
4
"context"
5
- "github.com/stretchr/testify/assert"
6
5
"net/http"
7
6
"net/url"
8
7
"testing"
9
8
9
+ "github.com/stretchr/testify/assert"
10
+
10
11
"github.com/astronomer/astronomer-terraform-provider/internal/clients"
11
12
)
12
13
Original file line number Diff line number Diff line change 1
1
package datasources_test
2
2
3
3
import (
4
- astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
5
4
"os"
6
5
"testing"
7
6
7
+ astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
8
+
8
9
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9
10
)
10
11
Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ package datasources_test
2
2
3
3
import (
4
4
"fmt"
5
+ "testing"
6
+
5
7
astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
6
8
"github.com/astronomer/astronomer-terraform-provider/internal/utils"
7
- "testing"
8
9
9
10
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
10
11
)
Original file line number Diff line number Diff line change @@ -2,12 +2,13 @@ package datasources_test
2
2
3
3
import (
4
4
"fmt"
5
+ "strconv"
6
+ "testing"
7
+
5
8
astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
6
9
"github.com/astronomer/astronomer-terraform-provider/internal/utils"
7
10
"github.com/hashicorp/terraform-plugin-testing/terraform"
8
11
"github.com/lucsky/cuid"
9
- "strconv"
10
- "testing"
11
12
12
13
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
13
14
)
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ package provider
2
2
3
3
import (
4
4
"context"
5
+ "os"
6
+
5
7
"github.com/astronomer/astronomer-terraform-provider/internal/clients/iam"
6
8
"github.com/astronomer/astronomer-terraform-provider/internal/clients/platform"
7
9
"github.com/astronomer/astronomer-terraform-provider/internal/provider/datasources"
@@ -16,7 +18,6 @@ import (
16
18
"github.com/hashicorp/terraform-plugin-framework/resource"
17
19
"github.com/hashicorp/terraform-plugin-framework/types"
18
20
"github.com/hashicorp/terraform-plugin-log/tflog"
19
- "os"
20
21
)
21
22
22
23
// Ensure AstronomerProvider satisfies various provider interfaces.
Original file line number Diff line number Diff line change @@ -3,16 +3,17 @@ package provider_test
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "os"
7
+ "regexp"
8
+ "testing"
9
+
6
10
astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
7
11
"github.com/hashicorp/terraform-plugin-framework/provider"
8
12
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
9
13
"github.com/hashicorp/terraform-plugin-go/tftypes"
10
14
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
11
15
"github.com/lucsky/cuid"
12
16
"github.com/stretchr/testify/assert"
13
- "os"
14
- "regexp"
15
- "testing"
16
17
)
17
18
18
19
func TestUnit_Provider (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ package provider
2
2
3
3
import (
4
4
"fmt"
5
- "github.com/hashicorp/terraform-plugin-framework/providerserver"
6
- "github.com/hashicorp/terraform-plugin-go/tfprotov6"
7
5
"os"
8
6
"testing"
7
+
8
+ "github.com/hashicorp/terraform-plugin-framework/providerserver"
9
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6"
9
10
)
10
11
11
12
// TestAccProtoV6ProviderFactories are used to instantiate a provider during
Original file line number Diff line number Diff line change @@ -3,15 +3,16 @@ package resources_test
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "os"
7
+ "testing"
8
+
6
9
"github.com/astronomer/astronomer-terraform-provider/internal/clients/platform"
7
10
astronomerprovider "github.com/astronomer/astronomer-terraform-provider/internal/provider"
8
11
"github.com/astronomer/astronomer-terraform-provider/internal/utils"
9
12
"github.com/hashicorp/terraform-plugin-testing/config"
10
13
"github.com/hashicorp/terraform-plugin-testing/plancheck"
11
14
"github.com/hashicorp/terraform-plugin-testing/terraform"
12
15
"github.com/stretchr/testify/assert"
13
- "os"
14
- "testing"
15
16
16
17
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
17
18
)
Original file line number Diff line number Diff line change 1
1
package schemas
2
2
3
3
import (
4
+ "regexp"
5
+
4
6
"github.com/astronomer/astronomer-terraform-provider/internal/provider/validators"
5
7
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
6
8
"github.com/hashicorp/terraform-plugin-framework/provider/schema"
7
9
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
8
- "regexp"
9
10
)
10
11
11
12
func ProviderSchemaAttributes () map [string ]schema.Attribute {
Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ package schemas_test
2
2
3
3
import (
4
4
"context"
5
- "github.com/stretchr/testify/assert"
6
5
"testing"
7
6
7
+ "github.com/stretchr/testify/assert"
8
+
8
9
"github.com/astronomer/astronomer-terraform-provider/internal/provider/schemas"
9
10
10
11
"github.com/astronomer/astronomer-terraform-provider/internal/clients/iam"
Original file line number Diff line number Diff line change 1
1
package validators_test
2
2
3
3
import (
4
+ "testing"
5
+
4
6
"github.com/astronomer/astronomer-terraform-provider/internal/provider/validators"
5
7
"github.com/hashicorp/terraform-plugin-framework/attr"
6
8
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
7
9
"github.com/hashicorp/terraform-plugin-framework/types"
8
10
"github.com/lucsky/cuid"
9
11
"github.com/samber/lo"
10
12
"github.com/stretchr/testify/assert"
11
- "testing"
12
13
)
13
14
14
15
func TestUnit_Validators_ListIsCuids (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ package utils_test
2
2
3
3
import (
4
4
"context"
5
- "github.com/stretchr/testify/assert"
6
5
"testing"
7
6
7
+ "github.com/stretchr/testify/assert"
8
+
8
9
"github.com/astronomer/astronomer-terraform-provider/internal/utils"
9
10
"github.com/hashicorp/terraform-plugin-framework/datasource"
10
11
"github.com/hashicorp/terraform-plugin-framework/resource"
Original file line number Diff line number Diff line change @@ -3,13 +3,14 @@ package utils_test
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "testing"
7
+
6
8
"github.com/astronomer/astronomer-terraform-provider/internal/provider/models"
7
9
"github.com/astronomer/astronomer-terraform-provider/internal/provider/schemas"
8
10
"github.com/hashicorp/terraform-plugin-framework/attr"
9
11
"github.com/hashicorp/terraform-plugin-framework/diag"
10
12
"github.com/hashicorp/terraform-plugin-framework/types"
11
13
"github.com/stretchr/testify/assert"
12
- "testing"
13
14
14
15
"github.com/astronomer/astronomer-terraform-provider/internal/utils"
15
16
)
Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ package utils
2
2
3
3
import (
4
4
"fmt"
5
- "github.com/astronomer/astronomer-terraform-provider/internal/clients/platform"
6
- "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
7
5
"os"
8
6
"strings"
7
+
8
+ "github.com/astronomer/astronomer-terraform-provider/internal/clients/platform"
9
+ "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
9
10
)
10
11
11
12
var platformClient * platform.ClientWithResponses
You can’t perform that action at this time.
0 commit comments