github.com/cloudfoundry-attic/cli-with-i18n@v6.32.1-0.20171002233121-7401370d3b85+incompatible/integration/helpers/skip_experimental.go (about) 1 package helpers 2 3 import ( 4 "os" 5 "strconv" 6 7 . "github.com/onsi/ginkgo" 8 ) 9 10 // RunIfExperimental is for tests that should be skipped if CF_CLI_EXPERIMENTAL 11 // is set to false. 12 func RunIfExperimental(msg string) { 13 if experimental, err := strconv.ParseBool(os.Getenv("CF_CLI_EXPERIMENTAL")); err != nil || !experimental { 14 Skip("CF_CLI_EXPERIMENTAL=false - " + msg) 15 } 16 } 17 18 // SkipIfExperimental is for tests that should be skipped if 19 // CF_CLI_EXPERIMENTAL is set to true. 20 func SkipIfExperimental(msg string) { 21 if experimental, err := strconv.ParseBool(os.Getenv("CF_CLI_EXPERIMENTAL")); err == nil && experimental { 22 Skip("CF_CLI_EXPERIMENTAL=true - " + msg) 23 } 24 }