File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ package events
4
4
import (
5
5
"encoding/json"
6
6
"testing"
7
+ "time"
7
8
8
9
"github.com/aws/aws-lambda-go/events/test"
9
10
"github.com/stretchr/testify/assert"
@@ -25,10 +26,12 @@ func TestECRImageActionEventMarshaling(t *testing.T) {
25
26
assert .Equal (t , "ECR Image Action" , inputEvent .DetailType )
26
27
assert .Equal (t , "aws.ecr" , inputEvent .Source )
27
28
assert .Equal (t , "123456789012" , inputEvent .Account )
28
- assert .Equal (t , "2019-11-16T01:54:34Z" , inputEvent .Time )
29
29
assert .Equal (t , "us-west-2" , inputEvent .Region )
30
30
assert .Empty (t , inputEvent .Resources )
31
31
32
+ testTime , err := time .Parse (time .RFC3339 , "2019-11-16T01:54:34Z" )
33
+ assert .Equal (t , testTime , inputEvent .Time )
34
+
32
35
var detail = inputEvent .Detail
33
36
assert .Equal (t , "SUCCESS" , detail .Result )
34
37
assert .Equal (t , "my-repository-name" , detail .RepositoryName )
You can’t perform that action at this time.
0 commit comments