File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6565 - ' 1.11.*'
6666 - ' 1.12.*'
6767 - ' 1.13.*'
68+ include :
69+ # Org-scoped asset routing tests mutate shared state, so only run them
70+ # on a single Terraform version to avoid parallel conflicts.
71+ - terraform : ' 1.13.*'
72+ run_asset_routing_tests : true
6873 steps :
6974 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7075 - uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
7984 - env :
8085 TF_ACC : " 1"
8186 MONDOO_CONFIG_BASE64 : ${{ secrets.MONDOO_CONFIG_BASE64 }}
87+ RUN_ASSET_ROUTING_TESTS : ${{ matrix.run_asset_routing_tests }}
8288 run : go test -v -cover ./internal/provider/
8389 timeout-minutes : 10
8490
Original file line number Diff line number Diff line change @@ -5,12 +5,16 @@ package provider
55
66import (
77 "fmt"
8+ "os"
89 "testing"
910
1011 "github.com/hashicorp/terraform-plugin-testing/helper/resource"
1112)
1213
1314func TestAccAssetRoutingRuleResource (t * testing.T ) {
15+ if os .Getenv ("RUN_ASSET_ROUTING_TESTS" ) != "true" {
16+ t .Skip ("skipping: asset routing tests only run on a single TF version to avoid parallel conflicts" )
17+ }
1418 orgID , err := getOrgId ()
1519 if err != nil {
1620 t .Skip ("skipping: no org-scoped service account available" )
@@ -57,6 +61,9 @@ func TestAccAssetRoutingRuleResource(t *testing.T) {
5761}
5862
5963func TestAccAssetRoutingRuleResourceWithLabel (t * testing.T ) {
64+ if os .Getenv ("RUN_ASSET_ROUTING_TESTS" ) != "true" {
65+ t .Skip ("skipping: asset routing tests only run on a single TF version to avoid parallel conflicts" )
66+ }
6067 orgID , err := getOrgId ()
6168 if err != nil {
6269 t .Skip ("skipping: no org-scoped service account available" )
Original file line number Diff line number Diff line change @@ -5,12 +5,16 @@ package provider
55
66import (
77 "fmt"
8+ "os"
89 "testing"
910
1011 "github.com/hashicorp/terraform-plugin-testing/helper/resource"
1112)
1213
1314func TestAccAssetRoutingTableResource (t * testing.T ) {
15+ if os .Getenv ("RUN_ASSET_ROUTING_TESTS" ) != "true" {
16+ t .Skip ("skipping: asset routing tests only run on a single TF version to avoid parallel conflicts" )
17+ }
1418 orgID , err := getOrgId ()
1519 if err != nil {
1620 t .Skip ("skipping: no org-scoped service account available" )
You can’t perform that action at this time.
0 commit comments