@@ -15,6 +15,7 @@ import (
15
15
"strconv"
16
16
"testing"
17
17
18
+ "github.com/stretchr/testify/assert"
18
19
"github.com/stretchr/testify/require"
19
20
20
21
"github.com/coder/code-marketplace/storage"
@@ -25,6 +26,8 @@ type testStorage struct {
25
26
storage storage.Storage
26
27
write func (content []byte , elem ... string )
27
28
exists func (elem ... string ) bool
29
+
30
+ expectedManifest func (man * storage.VSIXManifest )
28
31
}
29
32
type storageFactory = func (t * testing.T ) testStorage
30
33
@@ -132,14 +135,14 @@ func TestStorage(t *testing.T) {
132
135
name : "Artifactory" ,
133
136
factory : artifactoryFactory ,
134
137
},
135
- // {
136
- // name: "SignedLocal",
137
- // factory: signed(localFactory),
138
- // },
139
- // {
140
- // name: "SignedArtifactory",
141
- // factory: signed(artifactoryFactory),
142
- // },
138
+ {
139
+ name : "SignedLocal" ,
140
+ factory : signed (true , localFactory ),
141
+ },
142
+ {
143
+ name : "SignedArtifactory" ,
144
+ factory : signed (true , artifactoryFactory ),
145
+ },
143
146
}
144
147
for _ , sf := range factories {
145
148
t .Run (sf .name , func (t * testing.T ) {
@@ -332,7 +335,12 @@ func testManifest(t *testing.T, factory storageFactory) {
332
335
Path : fmt .Sprintf ("%s.%s-%s.vsix" , test .extension .Publisher , test .extension .Name , test .version ),
333
336
Addressable : "true" ,
334
337
})
335
- require .Equal (t , test .expected , manifest )
338
+ if f .expectedManifest != nil {
339
+ f .expectedManifest (test .expected )
340
+ }
341
+ if ! assert .Equal (t , test .expected , manifest ) {
342
+ fmt .Println ("Asd" )
343
+ }
336
344
}
337
345
})
338
346
}
0 commit comments