Skip to content

Commit 3da1d80

Browse files
committed
Enable l2-component-property-deps conformance test
Enable this test with a program override since programgen does not yet support emitting method calls.
1 parent 3756b99 commit 3da1d80

File tree

14 files changed

+868
-29
lines changed

14 files changed

+868
-29
lines changed

pulumi-language-dotnet/language_test.go

+41-29
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"io"
2222
"os"
2323
"os/exec"
24+
"path/filepath"
2425
"sync"
2526
"testing"
2627

@@ -169,6 +170,44 @@ func runTestingHost(t *testing.T) (string, testingrpc.LanguageTestClient) {
169170
return engineAddress, client
170171
}
171172

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+
172211
func TestLanguage(t *testing.T) {
173212
t.Parallel()
174213
engineAddress, engine := runTestingHost(t)
@@ -207,42 +246,15 @@ func TestLanguage(t *testing.T) {
207246
Replacement: "ROOT/artifacts",
208247
},
209248
},
249+
ProgramOverrides: programOverrides,
210250
})
211251
require.NoError(t, err)
212252

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-
241253
for _, tt := range tests.Tests {
242254
tt := tt
243255
t.Run(tt, func(t *testing.T) {
244256
t.Parallel()
245-
if expected, ok := expectedToFail[tt]; ok {
257+
if expected, ok := expectedFailures[tt]; ok {
246258
t.Skipf("test %s is expected to fail: %s", tt, expected)
247259
}
248260

0 commit comments

Comments
 (0)