2018-03-21 20:43:21 +01:00
|
|
|
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
2017-10-31 02:33:03 +01:00
|
|
|
|
|
|
|
package tests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
2018-09-05 16:53:31 +02:00
|
|
|
"github.com/pulumi/pulumi/pkg/backend/filestate"
|
2017-10-31 02:33:03 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
2018-02-21 06:05:57 +01:00
|
|
|
// Disable stack backups for tests to avoid filling up ~/.pulumi/backups with unnecessary
|
|
|
|
// backups of test stacks.
|
2018-09-05 16:53:31 +02: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 06:05:57 +01:00
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
|
2017-10-31 02:33:03 +01:00
|
|
|
code := m.Run()
|
|
|
|
os.Exit(code)
|
|
|
|
}
|