File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,10 @@ func TestECSContainerInstanceEventMarshaling(t *testing.T) {
85
85
// `registeredResources` key and `remainingResources` key have `stringSetValue` key.
86
86
// if `stringSetValue` key is empty array, it should be removed from outputJSON.
87
87
var result map [string ]interface {}
88
- json .Unmarshal (outputJSON , & result )
88
+ err = json .Unmarshal (outputJSON , & result )
89
+ if err != nil {
90
+ t .Errorf ("could not marshal event. details: %v" , err )
91
+ }
89
92
for _ , resourcesType := range []string {"registeredResources" , "remainingResources" } {
90
93
resources := result ["detail" ].(map [string ]interface {})[resourcesType ].([]interface {})
91
94
for i , resource := range resources {
@@ -99,7 +102,10 @@ func TestECSContainerInstanceEventMarshaling(t *testing.T) {
99
102
}
100
103
}
101
104
}
102
- resultJSON , _ := json .Marshal (result )
105
+ resultJSON , err := json .Marshal (result )
106
+ if err != nil {
107
+ t .Errorf ("could not marshal event. details: %v" , err )
108
+ }
103
109
104
110
assert .JSONEq (t , string (outputJSON ), string (resultJSON ))
105
111
}
You can’t perform that action at this time.
0 commit comments