This PR updates the `pkg/testing/integration` package to support running integration tests against the Pulumi Service if desired. This is done through adding new options to `ProgramTestOptions`. (Generally adding support for providing values to flags that were previously inaccessible.) I added an integration test to confirm that it all works if the PULUMI_API environment variable is set. These tests aren't run in Travis, only manually. Since we cannot reliably run tests from `master` against the service because of the delay in rolling out updates to the Pulumi SDK, etc.
28 lines
822 B
Go
28 lines
822 B
Go
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
|
|
|
package cloud
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/pulumi/pulumi/pkg/testing/integration"
|
|
)
|
|
|
|
// TestRunTestInfrastructureAgainstService is a copy of the "TestStackOutputs" integration test, but configured to
|
|
// run against the Pulumi Service located at PULUMI_API (if set).
|
|
func TestRunTestInfrastructureAgainstService(t *testing.T) {
|
|
requirePulumiAPISet(t)
|
|
|
|
integration.ProgramTest(t, &integration.ProgramTestOptions{
|
|
Dir: "../integration/stack_outputs",
|
|
Dependencies: []string{"pulumi"},
|
|
Quick: true,
|
|
|
|
// Options specific to testing against the service. All environments have a "default" PPC in the moolumi org.
|
|
CloudURL: os.Getenv("PULUMI_API"),
|
|
Owner: "moolumi",
|
|
Repo: "pulumi",
|
|
PPCName: "default",
|
|
})
|
|
}
|