@@ -43,7 +43,7 @@ func TestWriteMetadataFile(t *testing.T) {
43
43
cases := []struct {
44
44
name string
45
45
exporterResponse map [string ]string
46
- excpected map [string ]interface {}
46
+ expected map [string ]interface {}
47
47
}{
48
48
{
49
49
name : "common" ,
@@ -52,7 +52,7 @@ func TestWriteMetadataFile(t *testing.T) {
52
52
"containerimage.descriptor" : "eyJtZWRpYVR5cGUiOiJhcHBsaWNhdGlvbi92bmQub2NpLmltYWdlLm1hbmlmZXN0LnYxK2pzb24iLCJkaWdlc3QiOiJzaGEyNTY6MTlmZmVhYjZmOGJjOTI5M2FjMmMzZmRmOTRlYmUyODM5NjI1NGM5OTNhZWEwYjVhNTQyY2ZiMDJlMDg4M2ZhMyIsInNpemUiOjUwNiwiYW5ub3RhdGlvbnMiOnsib3JnLm9wZW5jb250YWluZXJzLmltYWdlLmNyZWF0ZWQiOiIyMDIyLTAyLTA4VDE5OjIxOjAzWiJ9fQ==" , // {"mediaType":"application/vnd.oci.image.manifest.v1+json","digest":"sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3","size":506,"annotations":{"org.opencontainers.image.created":"2022-02-08T19:21:03Z"}}
53
53
"containerimage.digest" : "sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3" ,
54
54
},
55
- excpected : map [string ]interface {}{
55
+ expected : map [string ]interface {}{
56
56
"containerimage.config.digest" : "sha256:2937f66a9722f7f4a2df583de2f8cb97fc9196059a410e7f00072fc918930e66" ,
57
57
"containerimage.descriptor" : map [string ]interface {}{
58
58
"annotations" : map [string ]interface {}{
@@ -71,7 +71,7 @@ func TestWriteMetadataFile(t *testing.T) {
71
71
"key" : "MTI=" , // 12
72
72
"containerimage.digest" : "sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3" ,
73
73
},
74
- excpected : map [string ]interface {}{
74
+ expected : map [string ]interface {}{
75
75
"key" : "MTI=" ,
76
76
"containerimage.digest" : "sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3" ,
77
77
},
@@ -82,7 +82,7 @@ func TestWriteMetadataFile(t *testing.T) {
82
82
"key" : "e30=" , // {}
83
83
"containerimage.digest" : "sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3" ,
84
84
},
85
- excpected : map [string ]interface {}{
85
+ expected : map [string ]interface {}{
86
86
"key" : "e30=" ,
87
87
"containerimage.digest" : "sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3" ,
88
88
},
@@ -93,7 +93,7 @@ func TestWriteMetadataFile(t *testing.T) {
93
93
"key" : "W10=" , // []
94
94
"containerimage.digest" : "sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3" ,
95
95
},
96
- excpected : map [string ]interface {}{
96
+ expected : map [string ]interface {}{
97
97
"key" : "W10=" ,
98
98
"containerimage.digest" : "sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3" ,
99
99
},
@@ -104,7 +104,7 @@ func TestWriteMetadataFile(t *testing.T) {
104
104
"key" : "eyJmb28iOm51bGwsImJhciI6ImJheiJ9" , // {"foo":null,"bar":"baz"}
105
105
"containerimage.digest" : "sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3" ,
106
106
},
107
- excpected : map [string ]interface {}{
107
+ expected : map [string ]interface {}{
108
108
"key" : map [string ]interface {}{
109
109
"foo" : nil ,
110
110
"bar" : "baz" ,
@@ -123,7 +123,7 @@ func TestWriteMetadataFile(t *testing.T) {
123
123
require .NoError (t , err )
124
124
var raw map [string ]interface {}
125
125
require .NoError (t , json .Unmarshal (current , & raw ))
126
- require .Equal (t , tt .excpected , raw )
126
+ require .Equal (t , tt .expected , raw )
127
127
})
128
128
}
129
129
}
0 commit comments