Skip to content

Commit

Permalink
ci: Move several tests out of smoke test jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFriel committed Nov 4, 2022
1 parent b415bbd commit 28b1ae2
Show file tree
Hide file tree
Showing 15 changed files with 844 additions and 674 deletions.
4 changes: 2 additions & 2 deletions tests/integration/gather_plugin/dotnet/MyStack.cs
Expand Up @@ -7,10 +7,10 @@ public MyStack()
// Create an AWS resource (S3 Bucket)
var r = new Random(
"default", 10, new ComponentResourceOptions{
PluginDownloadURL = "get.com",
PluginDownloadURL = "get.example.test",
});
var provider = new Provider("explicit", new CustomResourceOptions{
PluginDownloadURL = "get.pulumi/test/providers",
PluginDownloadURL = "get.pulumi.test/providers",
});
var e = new Random("explicit", 8, new ComponentResourceOptions{
Provider = provider,
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/gather_plugin/go/main.go
Expand Up @@ -14,13 +14,13 @@ func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
r, err := NewRandom(ctx, "default", &RandomArgs{
Length: pulumi.Int(10),
}, pulumi.PluginDownloadURL("get.com"))
}, pulumi.PluginDownloadURL("get.example.test"))
if err != nil {
return err
}

provider, err := NewProvider(ctx, "explicit",
pulumi.PluginDownloadURL("get.pulumi/test/providers"))
pulumi.PluginDownloadURL("get.pulumi.test/providers"))
e, err := NewRandom(ctx, "explicit", &RandomArgs{
Length: pulumi.Int(8),
}, pulumi.Provider(provider))
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/gather_plugin/nodejs/index.ts
Expand Up @@ -17,12 +17,12 @@ class RandomProvider extends pulumi.ProviderResource {
}

const r = new Random("default", 10, {
pluginDownloadURL: "get.com",
pluginDownloadURL: "get.example.test",
});
export const defaultProvider = r.result;

const provider = new RandomProvider("explicit", {
pluginDownloadURL: "get.pulumi/test/providers",
pluginDownloadURL: "get.pulumi.test/providers",
});

new Random("explicit", 8, { provider: provider });
4 changes: 2 additions & 2 deletions tests/integration/gather_plugin/python/__main__.py
Expand Up @@ -18,8 +18,8 @@ class RandomProvider(Provider):
def __init__(self, opts: Optional[ResourceOptions]=None):
Provider.__init__(self, "testprovider", "provider", None, opts)

example_url = ResourceOptions(plugin_download_url="get.com")
provider_url = ResourceOptions(plugin_download_url="get.pulumi/test/providers")
example_url = ResourceOptions(plugin_download_url="get.example.test")
provider_url = ResourceOptions(plugin_download_url="get.pulumi.test/providers")

# Create resource with specified PluginDownloadURL
r = Random("default", length=10, opts=example_url)
Expand Down
15 changes: 14 additions & 1 deletion tests/integration/integration_dotnet_smoke_test.go
@@ -1,4 +1,17 @@
// Copyright 2016-2020, Pulumi Corporation. All rights reserved.
// Copyright 2016-2022, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build dotnet || all

package ints
Expand Down
15 changes: 14 additions & 1 deletion tests/integration/integration_dotnet_test.go
@@ -1,4 +1,17 @@
// Copyright 2016-2020, Pulumi Corporation. All rights reserved.
// Copyright 2016-2022, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build (dotnet || all) && !smoke

package ints
Expand Down
26 changes: 14 additions & 12 deletions tests/integration/integration_go_smoke_test.go
@@ -1,4 +1,17 @@
// Copyright 2016-2021, Pulumi Corporation. All rights reserved.
// Copyright 2016-2022, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build go || all

package ints
Expand Down Expand Up @@ -162,14 +175,3 @@ func optsForConstructGo(t *testing.T, dir string, expectedResourceCount int, loc
},
}
}

// TestRefreshGo simply tests that we can build and run an empty Go project with the `refresh` option set.
func TestRefreshGo(t *testing.T) {
integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: filepath.Join("refresh", "go"),
Dependencies: []string{
"github.com/pulumi/pulumi/sdk/v3",
},
Quick: true,
})
}
26 changes: 25 additions & 1 deletion tests/integration/integration_go_test.go
@@ -1,4 +1,17 @@
// Copyright 2016-2021, Pulumi Corporation. All rights reserved.
// Copyright 2016-2022, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build (go || all) && !smoke

package ints
Expand Down Expand Up @@ -787,3 +800,14 @@ func TestProjectMainGo(t *testing.T) {
}
integration.ProgramTest(t, &test)
}

// TestRefreshGo simply tests that we can build and run an empty Go project with the `refresh` option set.
func TestRefreshGo(t *testing.T) {
integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: filepath.Join("refresh", "go"),
Dependencies: []string{
"github.com/pulumi/pulumi/sdk/v3",
},
Quick: true,
})
}
15 changes: 14 additions & 1 deletion tests/integration/integration_nodejs_smoke_test.go
@@ -1,4 +1,17 @@
// Copyright 2016-2022, Pulumi Corporation. All rights reserved.
// Copyright 2016-2022, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build nodejs || all

package ints
Expand Down
15 changes: 14 additions & 1 deletion tests/integration/integration_nodejs_test.go
@@ -1,4 +1,17 @@
// Copyright 2016-2022, Pulumi Corporation. All rights reserved.
// Copyright 2016-2022, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build (nodejs || all) && !smoke

package ints
Expand Down
15 changes: 14 additions & 1 deletion tests/integration/integration_python_smoke_test.go
@@ -1,4 +1,17 @@
// Copyright 2016-2021, Pulumi Corporation. All rights reserved.
// Copyright 2016-2022, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build python || all

package ints
Expand Down
15 changes: 14 additions & 1 deletion tests/integration/integration_python_test.go
@@ -1,4 +1,17 @@
// Copyright 2016-2021, Pulumi Corporation. All rights reserved.
// Copyright 2016-2022, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build (python || all) && !smoke

package ints
Expand Down

0 comments on commit 28b1ae2

Please sign in to comment.