2018-03-21 19:43:21 +00:00
|
|
|
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
2017-10-31 01:33:03 +00:00
|
|
|
|
|
|
|
package tests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
2018-09-05 14:53:31 +00:00
|
|
|
"github.com/pulumi/pulumi/pkg/backend/filestate"
|
2017-10-31 01:33:03 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
2018-02-21 05:05:57 +00:00
|
|
|
// Disable stack backups for tests to avoid filling up ~/.pulumi/backups with unnecessary
|
|
|
|
// backups of test stacks.
|
2018-09-05 14:53:31 +00:00
|
|
|
if err := os.Setenv(filestate.DisableCheckpointBackupsEnvVar, "1"); err != nil {
|
|
|
|
fmt.Printf("error setting env var '%s': %v\n", filestate.DisableCheckpointBackupsEnvVar, err)
|
2018-02-21 05:05:57 +00:00
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
|
2017-10-31 01:33:03 +00:00
|
|
|
code := m.Run()
|
|
|
|
os.Exit(code)
|
|
|
|
}
|