github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/mergeCode/libnetwork/testutils/context_windows.go (about)

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