pulumi/tests/main_test.go

25 lines
595 B
Go
Raw Permalink Normal View History

// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
2017-10-31 01:33:03 +00:00
package tests
import (
"fmt"
"os"
"testing"
"github.com/pulumi/pulumi/sdk/v3/go/common/env"
2017-10-31 01:33:03 +00:00
)
func TestMain(m *testing.M) {
// Disable stack backups for tests to avoid filling up ~/.pulumi/backups with unnecessary
// backups of test stacks.
disableCheckpointBackups := env.DIYBackendDisableCheckpointBackups.Var().Name()
if err := os.Setenv(disableCheckpointBackups, "1"); err != nil {
fmt.Printf("error setting env var '%s': %v\n", disableCheckpointBackups, err)
os.Exit(1)
}
2017-10-31 01:33:03 +00:00
code := m.Run()
os.Exit(code)
}