iwahbe/turn on dotnet compile checks (#8044)

* Add dotnet tests back in

* Merge in new test results from master

* re-enable output-funcs code
This commit is contained in:
Ian Wahbe 2021-09-23 14:31:17 -07:00 committed by GitHub
parent 3f6f9bc398
commit d43b8984fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 50 deletions

View file

@ -1,6 +1,8 @@
package dotnet
import (
"os"
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
@ -9,6 +11,7 @@ import (
"github.com/pulumi/pulumi/pkg/v3/codegen/internal/test"
"github.com/pulumi/pulumi/pkg/v3/codegen/schema"
"github.com/pulumi/pulumi/pkg/v3/testing/integration"
"github.com/pulumi/pulumi/sdk/v3/go/common/util/contract"
"github.com/pulumi/pulumi/sdk/v3/go/common/util/executable"
)
@ -28,6 +31,10 @@ func typeCheckGeneratedPackage(t *testing.T, pwd string) {
dotnet, err = executable.FindExecutable("dotnet")
require.NoError(t, err)
cmdOptions := integration.ProgramTestOptions{}
versionPath := filepath.Join(pwd, "version.txt")
err = os.WriteFile(versionPath, []byte("0.0.0\n"), 0600)
defer func() { contract.IgnoreError(os.Remove(versionPath)) }()
require.NoError(t, err)
err = integration.RunCommand(t, "dotnet build", []string{dotnet, "build"}, pwd, &cmdOptions)
require.NoError(t, err)
}

View file

@ -42,21 +42,19 @@ const (
var sdkTests = []sdkTest{
{
Directory: "dash-named-schema",
Description: "Simple schema with a two part name (foo-bar)",
Skip: codegen.NewStringSet("python/test"),
SkipCompileCheck: codegen.NewStringSet(dotnet),
Directory: "dash-named-schema",
Description: "Simple schema with a two part name (foo-bar)",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "input-collision",
Description: "Schema with types that could potentially produce collisions (go).",
SkipCompileCheck: codegen.NewStringSet(dotnet),
Skip: codegen.NewStringSet("python/test"),
Directory: "input-collision",
Description: "Schema with types that could potentially produce collisions (go).",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "external-resource-schema",
Description: "External resource schema",
SkipCompileCheck: codegen.NewStringSet(nodejs, golang, dotnet),
SkipCompileCheck: codegen.NewStringSet(nodejs, golang),
Skip: codegen.NewStringSet("python/test"),
},
{
@ -72,52 +70,44 @@ var sdkTests = []sdkTest{
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "plain-schema-gh6957",
Description: "Repro for #6957",
SkipCompileCheck: codegen.NewStringSet(dotnet),
Skip: codegen.NewStringSet("python/test"),
Directory: "plain-schema-gh6957",
Description: "Repro for #6957",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "resource-args-python-case-insensitive",
Description: "Resource args with same named resource and type case insensitive",
SkipCompileCheck: codegen.NewStringSet(dotnet),
Skip: codegen.NewStringSet("python/test"),
Directory: "resource-args-python-case-insensitive",
Description: "Resource args with same named resource and type case insensitive",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "resource-args-python",
Description: "Resource args with same named resource and type",
SkipCompileCheck: codegen.NewStringSet(dotnet),
Skip: codegen.NewStringSet("python/test"),
Directory: "resource-args-python",
Description: "Resource args with same named resource and type",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "simple-enum-schema",
Description: "Simple schema with enum types",
SkipCompileCheck: codegen.NewStringSet(dotnet),
Skip: codegen.NewStringSet("python/test"),
Directory: "simple-enum-schema",
Description: "Simple schema with enum types",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "simple-plain-schema",
Description: "Simple schema with plain properties",
SkipCompileCheck: codegen.NewStringSet(dotnet),
Skip: codegen.NewStringSet("python/test"),
Directory: "simple-plain-schema",
Description: "Simple schema with plain properties",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "simple-plain-schema-with-root-package",
Description: "Simple schema with root package set",
SkipCompileCheck: codegen.NewStringSet(dotnet),
Skip: codegen.NewStringSet("python/test"),
Directory: "simple-plain-schema-with-root-package",
Description: "Simple schema with root package set",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "simple-resource-schema",
Description: "Simple schema with local resource properties",
SkipCompileCheck: codegen.NewStringSet(dotnet),
Skip: codegen.NewStringSet("python/test"),
Directory: "simple-resource-schema",
Description: "Simple schema with local resource properties",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "simple-resource-schema-custom-pypackage-name",
Description: "Simple schema with local resource properties and custom Python package name",
SkipCompileCheck: codegen.NewStringSet(dotnet),
Skip: codegen.NewStringSet("python/test"),
Directory: "simple-resource-schema-custom-pypackage-name",
Description: "Simple schema with local resource properties and custom Python package name",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "simple-methods-schema",
@ -126,10 +116,9 @@ var sdkTests = []sdkTest{
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "simple-yaml-schema",
Description: "Simple schema encoded using YAML",
SkipCompileCheck: codegen.NewStringSet(dotnet),
Skip: codegen.NewStringSet("python/test"),
Directory: "simple-yaml-schema",
Description: "Simple schema encoded using YAML",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "provider-config-schema",
@ -140,7 +129,7 @@ var sdkTests = []sdkTest{
{
Directory: "replace-on-change",
Description: "Simple use of replaceOnChange in schema",
SkipCompileCheck: codegen.NewStringSet(golang, dotnet),
SkipCompileCheck: codegen.NewStringSet(golang),
Skip: codegen.NewStringSet("python/test"),
},
{
@ -150,10 +139,9 @@ var sdkTests = []sdkTest{
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "hyphen-url",
Description: "A resource url with a hyphen in it's path",
SkipCompileCheck: codegen.NewStringSet(dotnet),
Skip: codegen.NewStringSet("python/test"),
Directory: "hyphen-url",
Description: "A resource url with a hyphen in it's path",
Skip: codegen.NewStringSet("python/test"),
},
{
Directory: "output-funcs",