github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/libnetwork/testutils/context_windows.go (about)

     1  package testutils
     2  
     3  import (
     4  	"os"
     5  	"testing"
     6  )
     7  
     8  // SetupTestOSContext joins a new network namespace, and returns its associated
     9  // teardown function.
    10  //
    11  // Example usage:
    12  //
    13  //	defer SetupTestOSContext(t)()
    14  func SetupTestOSContext(t *testing.T) func() {
    15  	return func() {
    16  	}
    17  }
    18  
    19  // RunningOnCircleCI returns true if being executed on libnetwork Circle CI setup
    20  func RunningOnCircleCI() bool {
    21  	return os.Getenv("CIRCLECI") != ""
    22  }