pulumi/tests/main_test.go

24 lines
535 B
Go
Raw Normal View History

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