Skip to content

Commit

Permalink
Merge pull request #166 from Cox-Automotive/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
elliottzack429 committed May 4, 2022
2 parents 5a6f343 + 7d1a1c4 commit 15b5917
Show file tree
Hide file tree
Showing 18 changed files with 959 additions and 119 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,31 @@ cd terraform-provider-alks
make build test
```

As stated above, if the tests run, everything is working. What you won't see are any passing tests. To get to an operational testing state:
1. set the ALKS_URL and TF_ACC environment variables
```bash
export TF_ACC=true
export ALKS_URL=https://dev.alks.coxautoinc.com/rest
```
2. Copy the environment variables from **CoxAT Labs 95 (ALKS Dev)** into your terminal
```bash
export AWS_ACCESS_KEY_ID=<key_from_alks_web>
export AWS_SECRET_ACCESS_KEY=<key_from_alks_web>
export AWS_SESSION_TOKEN=<token_from_alks_web>
export AWS_DEFAULT_REGION=us-east-1
```
If an error stating `Role already exists with the same name: <role-name>` is encountered during testing (errored out tests do not initiate resource tear down), navigate to the AWS console of the Labs account from ALKSWeb and manually delete the IAM role listed in the error.

If you need any additional dependencies while developing, add the dependency by running `go get <dependency>` and then add it to the vendor folder by running `go mod vendor`.

## Updating The Version of alks-go
If using VSCode, hover over the versioned alks-go import in go.mod and click on the link to go.dev (Go package index). The latest version should have the commit hash at the HEAD of master (you may have to wait for the site to update ~ 20 min). Copy the version number and paste it over the previous version in go.mod. On the command line:
```bash
go mod download github.com/Cox-Automotive/alks-go
go mod vendor
go mod tidy
```
At this point, the dependency should reflect the state of alks-go's master branch
## Documentation

Documentation and examples can be found on the [Terraform website](https://registry.terraform.io/providers/Cox-Automotive/alks/latest/docs).
7 changes: 4 additions & 3 deletions data_source_alks_keys.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package main

import (
"github.com/Cox-Automotive/alks-go"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"log"
"strings"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func dataSourceAlksKeys() *schema.Resource {
Expand Down Expand Up @@ -38,7 +38,8 @@ func dataSourceAlksKeys() *schema.Resource {
func dataSourceAlksKeysRead(d *schema.ResourceData, meta interface{}) error {
log.Printf("[INFO] ALKS Keys Data Source Read")

client := meta.(*alks.Client)
providerStruct := meta.(*AlksClient)
client := providerStruct.client
resp, err := client.CreateIamSession()

if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/local_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mkdir -p ~/.terraform.d/plugins &&

```sh
mkdir -p ~/.terraform.d/plugins/Cox-Automotive/engineering-enablement/alks/2.0.5/darwin_amd64 &&
curl -Ls https://api.github.com/repos/Cox-Automotive/terraform-provider-alks/releases | jq -r --arg release "v2.0.5" --arg arch "$(uname -s | tr A-Z a-z)" '.[] | select(.tag_name | contains($release)) | .assets[]| select(.browser_download_url | contains($arch)) | select(.browser_download_url | contains("amd64")) | .browser_download_url' |
curl -Ls https://api.github.com/repos/Cox-Automotive/terraform-provider-alks/releases | jq -r --arg release "v2.1.1" --arg arch "$(uname -s | tr A-Z a-z)" '.[] | select(.tag_name | contains($release)) | .assets[]| select(.browser_download_url | contains($arch)) | select(.browser_download_url | contains("amd64")) | .browser_download_url' |
xargs -n 1 curl -Lo ~/.terraform.d/plugins/Cox-Automotive/engineering-enablement/alks/2.0.5/darwin_amd64/terraform-provider-alks.zip &&
pushd ~/.terraform.d/plugins/Cox-Automotive/engineering-enablement/alks/2.0.5/darwin_amd64 &&
unzip ~/.terraform.d/plugins/Cox-Automotive/engineering-enablement/alks/2.0.5/darwin_amd64/terraform-provider-alks.zip -d terraform-provider-alks-tmp &&
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/Cox-Automotive/terraform-provider-alks
go 1.14

require (
github.com/Cox-Automotive/alks-go v0.0.0-20220218164749-e4de33286d92
github.com/Cox-Automotive/alks-go v0.0.0-20220502192728-623c28f3b92b
github.com/aws/aws-sdk-go v1.31.15
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/terraform-json v0.13.0 // indirect
Expand Down
17 changes: 2 additions & 15 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Cox-Automotive/alks-go v0.0.0-20210507174057-2080b54cd46c h1:fAoVhk7jvz2Dyv68E5GIgIugkFGrPSADxef+gM83Evc=
github.com/Cox-Automotive/alks-go v0.0.0-20210507174057-2080b54cd46c/go.mod h1:jJNgXthl59Vt2tJHSC3WZ0vlopV9xqdclfQuLgwHjOw=
github.com/Cox-Automotive/alks-go v0.0.0-20220204185347-3eb3a57f4a8e h1:7NtH5BFwe34RO3N21O7jm1kT6Rcg0KvbTX0PYCyhgTY=
github.com/Cox-Automotive/alks-go v0.0.0-20220204185347-3eb3a57f4a8e/go.mod h1:jJNgXthl59Vt2tJHSC3WZ0vlopV9xqdclfQuLgwHjOw=
github.com/Cox-Automotive/alks-go v0.0.0-20220204233541-ba8ac1a4fbb6 h1:uL+oMMRaAvQxw/ETTuiD8vzftU8hA6zvFqUDCVnPmTA=
github.com/Cox-Automotive/alks-go v0.0.0-20220204233541-ba8ac1a4fbb6/go.mod h1:jJNgXthl59Vt2tJHSC3WZ0vlopV9xqdclfQuLgwHjOw=
github.com/Cox-Automotive/alks-go v0.0.0-20220218164749-e4de33286d92 h1:skXr8jFqk0BXpcCOPXGk+aQsgHRLkhKDZZVyAv3cFPc=
github.com/Cox-Automotive/alks-go v0.0.0-20220218164749-e4de33286d92/go.mod h1:jJNgXthl59Vt2tJHSC3WZ0vlopV9xqdclfQuLgwHjOw=
github.com/Cox-Automotive/alks-go v0.0.0-20220502192728-623c28f3b92b h1:lTQ/h4MVJzOmrWk0a16zb9pUapImXFeTlQkO3vlZtUI=
github.com/Cox-Automotive/alks-go v0.0.0-20220502192728-623c28f3b92b/go.mod h1:jJNgXthl59Vt2tJHSC3WZ0vlopV9xqdclfQuLgwHjOw=
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
Expand Down Expand Up @@ -142,7 +136,6 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
Expand Down Expand Up @@ -189,7 +182,6 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b
github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI=
github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw=
github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
Expand All @@ -201,7 +193,6 @@ github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/terraform-exec v0.13.0 h1:1Pth+pdWJAufJuWWjaVOVNEkoRTOjGn3hQpAqj4aPdg=
github.com/hashicorp/terraform-exec v0.13.0/go.mod h1:SGhto91bVRlgXQWcJ5znSz+29UZIa8kpBbkGwQ+g9E8=
github.com/hashicorp/terraform-json v0.8.0 h1:XObQ3PgqU52YLQKEaJ08QtUshAfN3yu4u8ebSW0vztc=
github.com/hashicorp/terraform-json v0.8.0/go.mod h1:3defM4kkMfttwiE7VakJDwCd4R+umhSQnvJwORXbprE=
github.com/hashicorp/terraform-json v0.13.0 h1:Li9L+lKD1FO5RVFRM1mMMIBDoUHslOniyEi5CM+FWGY=
github.com/hashicorp/terraform-json v0.13.0/go.mod h1:y5OdLBCT+rxbwnpxZs9kGL7R9ExU76+cpdY8zHwoazk=
Expand Down Expand Up @@ -250,7 +241,6 @@ github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW1
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mitchellh/cli v1.1.1/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
Expand All @@ -267,7 +257,6 @@ github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUb
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE=
github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
Expand Down Expand Up @@ -314,7 +303,6 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8=
github.com/zclconf/go-cty v1.2.1 h1:vGMsygfmeCl4Xb6OA5U5XVAaQZ69FvoG7X2jUtQujb8=
github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8=
github.com/zclconf/go-cty v1.9.1 h1:viqrgQwFl5UpSxc046qblj78wZXVDFnSOufaOTER+cc=
github.com/zclconf/go-cty v1.9.1/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk=
Expand Down Expand Up @@ -442,7 +430,6 @@ golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fq
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down
100 changes: 100 additions & 0 deletions iam_tags.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
package main

import (
"context"
"fmt"

"github.com/Cox-Automotive/alks-go"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func TagsSchema() *schema.Schema {
return &schema.Schema{
Type: schema.TypeMap,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
}
}

func TagsSchemaComputed() *schema.Schema {
return &schema.Schema{
Type: schema.TypeMap,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
}
}

//Removes default tags from a map of role specific + default tags
func removeDefaultTags(allTags map[string]interface{}, defalutTags []alks.Tag) []alks.Tag {
for _, t := range defalutTags {
//If the key and value of a tag returned from the role exists in the defaultTags list
//We will assume it was set as a default tag and remove it from role specific tag list
if val, ok := allTags[t.Key]; ok {
if val == t.Value {
delete(allTags, t.Key)
}
}

}
return tagMapToSlice(allTags)
}

func tagMapToSlice(tagMap map[string]interface{}) []alks.Tag {
tags := []alks.Tag{}
for k, v := range tagMap {
tag := alks.Tag{Key: k, Value: v.(string)}
tags = append(tags, tag)
}
return tags
}

func tagSliceToMap(tagSlice []alks.Tag) map[string]interface{} {
tagMap := make(map[string]interface{})
for _, t := range tagSlice {
tagMap[t.Key] = t.Value
}
return tagMap
}

//Combines tags defined on an individual resource with the default tags listed on the provider block
//Resource specific tags will overwrite default tags
func combineTagsWithDefault(tags []alks.Tag, defaultTags []alks.Tag) []alks.Tag {
defaultTagsMap := tagSliceToMap(defaultTags)

for _, t := range tags {
defaultTagsMap[t.Key] = t.Value
}
allTags := tagMapToSlice(defaultTagsMap)

return allTags
}

func SetTagsDiff(_ context.Context, diff *schema.ResourceDiff, meta interface{}) error {
defaultTags := meta.(*AlksClient).defaultTags

resourceTags := tagMapToSlice(diff.Get("tags").(map[string]interface{}))

allTags := combineTagsWithDefault(resourceTags, defaultTags)

// To ensure "tags_all" is correctly computed, we explicitly set the attribute diff
// when the merger of resource-level tags onto provider-level tags results in n > 0 tags,
// otherwise we mark the attribute as "Computed" only when their is a known diff (excluding an empty map)
// or a change for "tags_all".

if len(allTags) > 0 {
if err := diff.SetNew("tags_all", tagSliceToMap(allTags)); err != nil {
return fmt.Errorf("error setting new tags_all diff: %w", err)
}
} else if len(diff.Get("tags_all").(map[string]interface{})) > 0 {
if err := diff.SetNewComputed("tags_all"); err != nil {
return fmt.Errorf("error setting tags_all to computed: %w", err)
}
} else if diff.HasChange("tags_all") {
if err := diff.SetNewComputed("tags_all"); err != nil {
return fmt.Errorf("error setting tags_all to computed: %w", err)
}
}

return nil
}
106 changes: 106 additions & 0 deletions iam_tags_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
package main

import (
"reflect"
"testing"

"github.com/Cox-Automotive/alks-go"
)

func TestRemoveDefaultTags(t *testing.T) {
cases := []struct {
allTagsMap map[string]interface{}
defaultTagsSlice []alks.Tag
expected []alks.Tag
}{
{
allTagsMap: map[string]interface{}{
"resourceKey1": "resourceValue1",
"defaultKey1": "defaultValue1",
},
defaultTagsSlice: []alks.Tag{{Key: "defaultKey1", Value: "defaultValue1"}},
expected: []alks.Tag{{Key: "resourceKey1", Value: "resourceValue1"}},
},
{
allTagsMap: map[string]interface{}{
"defaultKey2": "defaultValue2",
"defaultKey1": "resourceValue2",
},
defaultTagsSlice: []alks.Tag{
{Key: "defaultKey2", Value: "defaultValue2"},
{Key: "defaultKey1", Value: "defaultValue2"},
},
expected: []alks.Tag{
{Key: "defaultKey1", Value: "resourceValue2"}, //Should not remove this key. We are assuming that if the key matches one in default but not the value, that the default key was overwritten on purpose in the role definition and shouldnt be removed
},
},
}

for _, c := range cases {
resourceTagsSlice := removeDefaultTags(c.allTagsMap, c.defaultTagsSlice)
if !reflect.DeepEqual(resourceTagsSlice, c.expected) {
t.Fatalf("Error matching output and expected: %#v vs %#v", resourceTagsSlice, c.expected)
}
}
}

func TestTagMapToSlice(t *testing.T) {
cases := []struct {
tagMap map[string]interface{}
expected []alks.Tag
}{
{
tagMap: map[string]interface{}{
"key1": "value1",
},
expected: []alks.Tag{{Key: "key1", Value: "value1"}},
},
}

for _, c := range cases {
tagSlice := tagMapToSlice(c.tagMap)
if !reflect.DeepEqual(tagSlice, c.expected) {
t.Fatalf("Error matching output and expected: %#v vs %#v", tagSlice, c.expected)
}
}
}

func TestTagSliceToMap(t *testing.T) {
cases := []struct {
tagSlice []alks.Tag
expected map[string]interface{}
}{
{
tagSlice: []alks.Tag{{Key: "defaultKey1", Value: "defaultValue1"}},
expected: map[string]interface{}{"defaultKey1": "defaultValue1"},
},
}

for _, c := range cases {
tagMap := tagSliceToMap(c.tagSlice)
if !reflect.DeepEqual(tagMap, c.expected) {
t.Fatalf("Error matching output and expected: %#v vs %#v", tagMap, c.expected)
}
}
}

func TestCombineTagsWithDefault(t *testing.T) {
cases := []struct {
defaultTagSlice []alks.Tag
resourceTagSlice []alks.Tag
expected []alks.Tag
}{
{
defaultTagSlice: []alks.Tag{{Key: "defaultKey1", Value: "defaultValue1"}},
resourceTagSlice: []alks.Tag{{Key: "defaultKey1", Value: "resourceValue1"}},
expected: []alks.Tag{{Key: "defaultKey1", Value: "resourceValue1"}},
},
}

for _, c := range cases {
tagSlice := combineTagsWithDefault(c.resourceTagSlice, c.defaultTagSlice)
if !reflect.DeepEqual(tagSlice, c.expected) {
t.Fatalf("Error matching output and expected: %#v vs %#v", tagSlice, c.expected)
}
}
}
Loading

0 comments on commit 15b5917

Please sign in to comment.