Skip to content

Commit

Permalink
fix: ci and linters
Browse files Browse the repository at this point in the history
  • Loading branch information
azrod committed Dec 26, 2024
1 parent 59c3080 commit 8bc2f6a
Show file tree
Hide file tree
Showing 24 changed files with 66 additions and 48 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ jobs:
TOKEN: ${{ secrets.CHANGELOG_PAT }}

golang-ci-lint:
needs: [pre-check]
name: "GolangCI Lint"
uses: orange-cloudavenue/workflows/.github/workflows/go_golangci-lint.yml@main

tests:
needs: [pre-check]
name: "Unit Tests"
uses: orange-cloudavenue/workflows/.github/workflows/go_unit-test.yml@main

tag:
needs: [pre-check]
needs: [golang-ci-lint, tests]
name: Tag
uses: orange-cloudavenue/workflows/.github/workflows/tag_create-tag.yml@main
with:
Expand Down
3 changes: 2 additions & 1 deletion boolplanmodifier/base_default_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"context"

"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
)

// DefaultFunc is a function that can be used to set a default value for a
Expand Down
5 changes: 3 additions & 2 deletions boolplanmodifier/default_env_var_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/boolplanmodifier"
)

Expand Down Expand Up @@ -81,7 +83,6 @@ func TestDefaultEnvVarModifierPlanModifyBool(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase
// set environnement variable
t.Setenv(envVarName, "true")

Expand Down
6 changes: 3 additions & 3 deletions boolplanmodifier/default_func_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/boolplanmodifier"
)

Expand Down Expand Up @@ -78,8 +80,6 @@ func TestDefaultFuncModifierPlanModifyBool(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase

t.Run(name, func(t *testing.T) {
// t.Parallel()

Expand Down
6 changes: 3 additions & 3 deletions boolplanmodifier/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/boolplanmodifier"
)

Expand Down Expand Up @@ -78,8 +80,6 @@ func TestDefaultModifierPlanModifyBool(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase

t.Run(name, func(t *testing.T) {
// t.Parallel()

Expand Down
3 changes: 2 additions & 1 deletion boolplanmodifier/require_replace_if_bool.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"fmt"

"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/types"
)

/*
Expand Down
7 changes: 4 additions & 3 deletions boolplanmodifier/require_replace_if_bool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ import (
"testing"

"github.com/google/go-cmp/cmp"

"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/provider/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-go/tftypes"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/boolplanmodifier"
Expand Down Expand Up @@ -134,8 +137,6 @@ func Test_requireReplaceIfBool(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase

t.Run(name, func(t *testing.T) {
t.Parallel()

Expand Down
3 changes: 2 additions & 1 deletion int64planmodifier/base_default_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"context"

"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
)

// DefaultFunc is a function that can be used to set a default value for a
Expand Down
5 changes: 3 additions & 2 deletions int64planmodifier/default_env_var_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/int64planmodifier"
)

Expand Down Expand Up @@ -81,7 +83,6 @@ func TestDefaultEnvVarModifierPlanModifyInt64(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase
// set environnement variable
t.Setenv(envVarName, "123")

Expand Down
6 changes: 3 additions & 3 deletions int64planmodifier/default_func_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/int64planmodifier"
)

Expand Down Expand Up @@ -78,8 +80,6 @@ func TestDefaultFuncModifierPlanModifyInt64(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase

t.Run(name, func(t *testing.T) {
// t.Parallel()

Expand Down
6 changes: 3 additions & 3 deletions int64planmodifier/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/int64planmodifier"
)

Expand Down Expand Up @@ -78,8 +80,6 @@ func TestDefaultModifierPlanModifyInt64(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase

t.Run(name, func(t *testing.T) {
// t.Parallel()

Expand Down
3 changes: 2 additions & 1 deletion int64planmodifier/require_replace_if_bool.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"fmt"

"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/types"
)

/*
Expand Down
7 changes: 4 additions & 3 deletions int64planmodifier/require_replace_if_bool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ import (
"testing"

"github.com/google/go-cmp/cmp"

"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/provider/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-go/tftypes"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/int64planmodifier"
Expand Down Expand Up @@ -134,8 +137,6 @@ func Test_requireReplaceIfBool(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase

t.Run(name, func(t *testing.T) {
t.Parallel()

Expand Down
3 changes: 2 additions & 1 deletion stringplanmodifier/base_default_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"context"

"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
)

// DefaultFunc is a function that can be used to set a default value for a
Expand Down
5 changes: 3 additions & 2 deletions stringplanmodifier/base_string_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"context"

"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
)

// StringChangeFunc is a function that can be used to change a string value.
Expand All @@ -24,7 +25,7 @@ type StringChangeFuncResponse struct {

// setStringChangeFunc
//
// Change the value of the strinf
// Change the value of the strinf.
func setChangeStringFunc(f StringChangeFunc, description, markdownDescription string) planmodifier.String {
return stringChangeFuncPlanModifier{
f: f,
Expand Down
6 changes: 3 additions & 3 deletions stringplanmodifier/default_empty_string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/stringplanmodifier"
)

Expand Down Expand Up @@ -78,8 +80,6 @@ func TestDefaultModifierPlanModifyEmptyString(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase

t.Run(name, func(t *testing.T) {
// t.Parallel()

Expand Down
5 changes: 3 additions & 2 deletions stringplanmodifier/default_env_var_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/stringplanmodifier"
)

Expand Down Expand Up @@ -81,7 +83,6 @@ func TestDefaultEnvVarModifierPlanModifyString(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase
// set environnement variable
t.Setenv(envVarName, envValue)

Expand Down
6 changes: 3 additions & 3 deletions stringplanmodifier/default_func_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import (

"github.com/dchest/uniuri"
"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/stringplanmodifier"
)

Expand Down Expand Up @@ -79,8 +81,6 @@ func TestDefaultFuncModifierPlanModifyString(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase

t.Run(name, func(t *testing.T) {
// t.Parallel()

Expand Down
6 changes: 3 additions & 3 deletions stringplanmodifier/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import (

"github.com/dchest/uniuri"
"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"

"github.com/orange-cloudavenue/terraform-plugin-framework-planmodifiers/stringplanmodifier"
)

Expand Down Expand Up @@ -79,8 +81,6 @@ func TestDefaultModifierPlanModifyString(t *testing.T) {
}

for name, testCase := range testCases {
name, testCase := name, testCase

t.Run(name, func(t *testing.T) {
// t.Parallel()

Expand Down
3 changes: 2 additions & 1 deletion stringplanmodifier/require_replace_if_bool.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"fmt"

"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/types"
)

/*
Expand Down
3 changes: 2 additions & 1 deletion stringplanmodifier/to_lower.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"context"
"strings"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
)

func ToLower() planmodifier.String {
Expand Down
Loading

0 comments on commit 8bc2f6a

Please sign in to comment.