github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/integration/helpers/docker.go (about)

     1  package helpers
     2  
     3  import (
     4  	"os"
     5  
     6  	. "github.com/onsi/ginkgo"
     7  )
     8  
     9  // SkipIfPrivateDockerInfoNotSet skips the test if CF_INT_DOCKER_IMAGE,
    10  // CF_INT_DOCKER_USERNAME, or CF_INT_DOCKER_PASSWORD environment variables are
    11  // not defined.
    12  func SkipIfPrivateDockerInfoNotSet() (string, string, string) {
    13  	privateDockerImage := os.Getenv("CF_INT_DOCKER_IMAGE")
    14  	privateDockerUsername := os.Getenv("CF_INT_DOCKER_USERNAME")
    15  	privateDockerPassword := os.Getenv("CF_INT_DOCKER_PASSWORD")
    16  
    17  	if privateDockerImage == "" || privateDockerUsername == "" || privateDockerPassword == "" {
    18  		Skip("CF_INT_DOCKER_IMAGE, CF_INT_DOCKER_USERNAME, or CF_INT_DOCKER_PASSWORD is not set")
    19  	}
    20  
    21  	return privateDockerImage, privateDockerUsername, privateDockerPassword
    22  }