@@ -21,6 +21,7 @@ import (
21
21
"io"
22
22
"os"
23
23
"os/exec"
24
+ "path/filepath"
24
25
"sync"
25
26
"testing"
26
27
@@ -169,6 +170,44 @@ func runTestingHost(t *testing.T) (string, testingrpc.LanguageTestClient) {
169
170
return engineAddress , client
170
171
}
171
172
173
+ // Add test names here that are expected to fail and the reason why they are failing
174
+ var expectedFailures = map [string ]string {
175
+ "l1-builtin-can" : "#489 codegen not implemented" ,
176
+ "l1-builtin-try" : "#490 codegen not implemented" ,
177
+ "l1-keyword-overlap" : "#493 update to pulumi 1.50 conformance failure" ,
178
+ "l2-component-call-simple" : "#491 update to pulumi 1.50 conformance failure" ,
179
+ "l2-resource-asset-archive" : "" +
180
+ "The namespace 'Pulumi.AssetArchive' conflicts with the type 'AssetArchive' in 'Pulumi, Version=1.0.0.0" ,
181
+ "l2-resource-config" : "sdk packing for config: build error before pack" ,
182
+ "l2-resource-alpha" : "" +
183
+ "wrong package reference Include=Pulumi.Alpha.3.0 Version=0-alpha.1.internal" ,
184
+ "l1-output-array" : "error CS0826: No best type found for implicitly-typed array" ,
185
+ "l1-output-map" : "Same error as with arrays about implicitly typed maps" ,
186
+ "l1-stack-reference" : "TODO: call getOutput" ,
187
+ "l2-resource-primitives" : "Cannot implicitly convert type 'int[]' to 'Pulumi.InputList<double>'" ,
188
+ "l2-failed-create-continue-on-error" : "build error before pack: exit status 1" ,
189
+ "l2-provider-grpc-config" : "dotnet build failed" ,
190
+ "l2-provider-grpc-config-secret" : "dotnet build failed" ,
191
+ "l2-provider-grpc-config-schema" : "dotnet build failed" ,
192
+ "l2-provider-grpc-config-schema-secret" : "dotnet build failed" ,
193
+ "l2-invoke-options-depends-on" : "dotnet build failed" ,
194
+ "l2-invoke-secrets" : "" +
195
+ "Pulumi.Deployment+InvokeException: 'simple-invoke:index:secretInvoke' failed: value is not a string" ,
196
+ "l2-map-keys" : "dotnet build failed" ,
197
+ "l2-resource-secret" : "test hanging" ,
198
+ "l1-builtin-project-root" : "#466" ,
199
+ }
200
+
201
+ // Add program overrides here for programs that can't yet be generated correctly due to programgen bugs.
202
+ var programOverrides = map [string ]* testingrpc.PrepareLanguageTestsRequest_ProgramOverride {
203
+ // TODO[pulumi/pulumi#18741]: Remove when programgen support for call is implemented.
204
+ "l2-component-property-deps" : {
205
+ Paths : []string {
206
+ filepath .Join ("testdata" , "overrides" , "l2-component-property-deps" ),
207
+ },
208
+ },
209
+ }
210
+
172
211
func TestLanguage (t * testing.T ) {
173
212
t .Parallel ()
174
213
engineAddress , engine := runTestingHost (t )
@@ -207,42 +246,15 @@ func TestLanguage(t *testing.T) {
207
246
Replacement : "ROOT/artifacts" ,
208
247
},
209
248
},
249
+ ProgramOverrides : programOverrides ,
210
250
})
211
251
require .NoError (t , err )
212
252
213
- expectedToFail := map [string ]string {
214
- "l1-builtin-can" : "#489 codegen not implemented" ,
215
- "l1-builtin-try" : "#490 codegen not implemented" ,
216
- "l1-keyword-overlap" : "#493 update to pulumi 1.50 conformance failure" ,
217
- "l2-component-call-simple" : "#491 update to pulumi 1.50 conformance failure" ,
218
- "l2-resource-asset-archive" : "" +
219
- "The namespace 'Pulumi.AssetArchive' conflicts with the type 'AssetArchive' in 'Pulumi, Version=1.0.0.0" ,
220
- "l2-resource-config" : "sdk packing for config: build error before pack" ,
221
- "l2-resource-alpha" : "" +
222
- "wrong package reference Include=Pulumi.Alpha.3.0 Version=0-alpha.1.internal" ,
223
- "l1-output-array" : "error CS0826: No best type found for implicitly-typed array" ,
224
- "l1-output-map" : "Same error as with arrays about implicitly typed maps" ,
225
- "l1-stack-reference" : "TODO: call getOutput" ,
226
- "l2-resource-primitives" : "Cannot implicitly convert type 'int[]' to 'Pulumi.InputList<double>'" ,
227
- "l2-failed-create-continue-on-error" : "build error before pack: exit status 1" ,
228
- "l2-provider-grpc-config" : "dotnet build failed" ,
229
- "l2-provider-grpc-config-secret" : "dotnet build failed" ,
230
- "l2-provider-grpc-config-schema" : "dotnet build failed" ,
231
- "l2-provider-grpc-config-schema-secret" : "dotnet build failed" ,
232
- "l2-invoke-options-depends-on" : "dotnet build failed" ,
233
- "l2-invoke-secrets" : "" +
234
- "Pulumi.Deployment+InvokeException: 'simple-invoke:index:secretInvoke' failed: value is not a string" ,
235
- "l2-map-keys" : "dotnet build failed" ,
236
- "l2-resource-secret" : "test hanging" ,
237
- "l1-builtin-project-root" : "#466" ,
238
- "l2-component-property-deps" : "https://github.com/pulumi/pulumi/issues/18741: add programgen support for call" ,
239
- }
240
-
241
253
for _ , tt := range tests .Tests {
242
254
tt := tt
243
255
t .Run (tt , func (t * testing.T ) {
244
256
t .Parallel ()
245
- if expected , ok := expectedToFail [tt ]; ok {
257
+ if expected , ok := expectedFailures [tt ]; ok {
246
258
t .Skipf ("test %s is expected to fail: %s" , tt , expected )
247
259
}
248
260
0 commit comments