From 567a08231d46d7374dbf0094cf401af1970b5218 Mon Sep 17 00:00:00 2001 From: Gavin Bunney Date: Tue, 15 Oct 2019 13:47:31 -0700 Subject: [PATCH] Test fixes --- bitbucket/data_project_hooks.go | 2 ++ bitbucket/data_repository_hooks.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bitbucket/data_project_hooks.go b/bitbucket/data_project_hooks.go index cb0ce31..bf370a4 100644 --- a/bitbucket/data_project_hooks.go +++ b/bitbucket/data_project_hooks.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "net/url" + "sort" ) type PaginatedProjectHooksValue struct { @@ -169,6 +170,7 @@ func readProjectHooks(m interface{}, project string, typeFilter string) ([]Proje } for _, hook := range projectHooks.Values { + sort.Strings(hook.Details.ScopeTypes) h := ProjectHook{ Key: hook.Details.Key, Name: hook.Details.Name, diff --git a/bitbucket/data_repository_hooks.go b/bitbucket/data_repository_hooks.go index cfd8c72..2c83a96 100644 --- a/bitbucket/data_repository_hooks.go +++ b/bitbucket/data_repository_hooks.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "net/url" + "sort" ) type PaginatedRepositoryHooksValue struct { @@ -174,6 +175,7 @@ func readRepositoryHooks(m interface{}, project string, repository string, typeF } for _, hook := range repositoryHooks.Values { + sort.Strings(hook.Details.ScopeTypes) h := RepositoryHook{ Key: hook.Details.Key, Name: hook.Details.Name,