func GetTempDirectory() (string, error) {
	var (
		dir string
		err error
	)
	// If a temp dir is referenced, return that
	if os.Getenv("E2E_TEMP_DIR") != "" {
		dir = os.Getenv("E2E_TEMP_DIR")
	} else {
		dir, err = os.Getwd()
		if err != nil {
			return "", err
		}
	}

	tmpDir, err := ioutil.TempDir(dir, "e2e_integration_test")
	if err != nil {
		return "", err
	}
	absDir, err := filepath.Abs(tmpDir)
	if err != nil {
		_ = os.RemoveAll(tmpDir)
		return "", err
	}

	return absDir, nil
}
// GetTempDirectory creates a temporary directory for shared integration
// test files, either in the working directory or a directory referenced by
// the E2E_TEMP_DIR environment variable
GetTempDirectory creates a temporary directory for shared integration
test files, either in the working directory or a directory referenced by
the E2E_TEMP_DIR environment variable
// GetTempDirectory creates a temporary directory for shared integration // test files either in the working directory or a directory referenced by // the E2E_TEMP_DIR environment variable
func GetTempDirectory() (string, error) {
	var (
		dir string
		err error
	)
	if os.Getenv("E2E_TEMP_DIR") != "" {
		dir = os.Getenv("E2E_TEMP_DIR")
	} else {
		dir, err = os.Getwd()
		if err != nil {
			return "", err
		}
	}
	tmpDir, err := ioutil.TempDir(dir, "e2e_integration_test")
	if err != nil {
		return "", err
	}
	absDir, err := filepath.Abs(tmpDir)
	if err != nil {
		_ = os.RemoveAll(tmpDir)
		return "", err
	}
	return absDir, nil
}
func GetTempDirectory ( ) ( string , error ) { var ( dir string err error ) if os . Getenv ( " " ) != " " { dir = os . Getenv ( " " ) } else { dir , err = os . Getwd ( ) if err != nil { return " " , err } } tmpDir , err := ioutil . TempDir ( dir , " " ) if err != nil { return " " , err } absDir , err := filepath . Abs ( tmpDir ) if err != nil { _ = os . RemoveAll ( tmpDir ) return " " , err } return absDir , nil }
GetTempDirectory creates a temporary directory for shared integration
test files, either in the working directory or a directory referenced by
the E2E_TEMP_DIR environment variable
GetTempDirectory creates a temporary directory for shared integration test files either in the working directory or a directory referenced by the E2E_TEMP_DIR environment variable
// If a temp dir is referenced, return that