File size: 373 Bytes
13555f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package utils

import (
	"os"
	"strings"
)

// IsRunningUnitTests returns true if this instance of FocalBoard is running unit or integration tests.
func IsRunningUnitTests() bool {
	testing := os.Getenv("FOCALBOARD_UNIT_TESTING")
	if testing == "" {
		return false
	}

	switch strings.ToLower(testing) {
	case "1", "t", "y", "true", "yes":
		return true
	}
	return false
}