Skip to content

Commit

Permalink
fix: build/tests
Browse files Browse the repository at this point in the history
  • Loading branch information
isometry committed May 4, 2024
1 parent b871a69 commit c202a95
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ jobs:
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- '1.0.*'
- '1.1.*'
- '1.2.*'
- '1.3.*'
- '1.4.*'
- '1.8.*'
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
Expand Down
7 changes: 6 additions & 1 deletion internal/helpers/mergo.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ func Mergo(ctx context.Context, objs []types.Dynamic, opts ...func(*mergo.Config
diags.Append(diag.NewErrorDiagnostic(fmt.Sprintf("Error encoding argument %d", i+1), err.Error()))
return
}
maps[i] = x.(map[string]any)
if y, ok := x.(map[string]any); !ok {
diags.Append(diag.NewErrorDiagnostic(fmt.Sprintf("Error converting argument %d to map", i+1), fmt.Sprintf("unexpected type: %T for value %#v", x, x)))
return
} else {
maps[i] = y
}
}

dst := maps[0]
Expand Down
12 changes: 5 additions & 7 deletions internal/provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
package provider

import (
"testing"

"github.com/hashicorp/terraform-plugin-framework/providerserver"
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
)
Expand All @@ -18,8 +16,8 @@ var testAccProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServe
"deepmerge": providerserver.NewProtocol6WithError(New("test")()),
}

func testAccPreCheck(t *testing.T) {
// You can add code here to run prior to any test case execution, for example assertions
// about the appropriate environment variables being set are common to see in a pre-check
// function.
}
// func testAccPreCheck(t *testing.T) {
// // You can add code here to run prior to any test case execution, for example assertions
// // about the appropriate environment variables being set are common to see in a pre-check
// // function.
// }

0 comments on commit c202a95

Please sign in to comment.