github.com/whamcloud/lemur@v0.0.0-20190827193804-4655df8a52af/uat/uat_runner_test.go (about)

     1  // Copyright (c) 2018 DDN. All rights reserved.
     2  // Use of this source code is governed by a MIT-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package uat
     6  
     7  import (
     8  	"log"
     9  	"os"
    10  	"testing"
    11  
    12  	"github.com/DATA-DOG/godog"
    13  )
    14  
    15  var runDir = "."
    16  var raceBinPath = "."
    17  
    18  func TestMain(m *testing.M) {
    19  	// Run the features tests from the compiled-in location.
    20  	if err := os.Chdir(runDir); err != nil {
    21  		log.Fatal(err)
    22  	}
    23  
    24  	// Prefix the path so that we can find our race-compiled binaries.
    25  	os.Setenv("PATH", raceBinPath+":"+os.Getenv("PATH"))
    26  
    27  	status := godog.Run(func(suite *godog.Suite) {
    28  		ConfigureSuite(suite)
    29  	})
    30  	os.Exit(status)
    31  }