Skip to content

Commit 5f1e5aa

Browse files
committed
Rename state migartion functions
Signed-off-by: Timo Sand <[email protected]>
1 parent d94aad9 commit 5f1e5aa

3 files changed

Lines changed: 5 additions & 5 deletions

github/resource_github_emu_group_mapping.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ func resourceGithubEMUGroupMapping() *schema.Resource {
5555
SchemaVersion: 1,
5656
StateUpgraders: []schema.StateUpgrader{
5757
{
58-
Type: resourceGithubEMUGroupMappingResourceV0().CoreConfigSchema().ImpliedType(),
59-
Upgrade: resourceGithubEMUGroupMappingInstanceStateUpgradeV0,
58+
Type: resourceGithubEMUGroupMappingV0().CoreConfigSchema().ImpliedType(),
59+
Upgrade: resourceGithubEMUGroupMappingStateUpgradeV0,
6060
Version: 0,
6161
},
6262
},

github/resource_github_emu_group_mapping_migration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1010
)
1111

12-
func resourceGithubEMUGroupMappingResourceV0() *schema.Resource {
12+
func resourceGithubEMUGroupMappingV0() *schema.Resource {
1313
return &schema.Resource{
1414
Schema: map[string]*schema.Schema{
1515
"team_slug": {
@@ -30,7 +30,7 @@ func resourceGithubEMUGroupMappingResourceV0() *schema.Resource {
3030
}
3131
}
3232

33-
func resourceGithubEMUGroupMappingInstanceStateUpgradeV0(ctx context.Context, rawState map[string]any, meta any) (map[string]any, error) {
33+
func resourceGithubEMUGroupMappingStateUpgradeV0(ctx context.Context, rawState map[string]any, meta any) (map[string]any, error) {
3434
orgName := meta.(*Owner).name
3535
tflog.Trace(ctx, "GitHub EMU Group Mapping State before migration", map[string]any{"state": rawState, "owner": orgName})
3636

github/resource_github_emu_group_mapping_migration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func TestGithub_MigrateEMUGroupMappingsState(t *testing.T) {
9292
}{
9393
{
9494
testName: "migrates v0 to v1",
95-
migrationFunc: resourceGithubEMUGroupMappingInstanceStateUpgradeV0,
95+
migrationFunc: resourceGithubEMUGroupMappingStateUpgradeV0,
9696
rawState: testResourceGithubEMUGroupMappingInstanceStateDataV0,
9797
want: testResourceGithubEMUGroupMappingInstanceStateDataV1,
9898
buildMockResponses: buildMockResponsesForMigrationV0toV1,

0 commit comments

Comments
 (0)