context_solaris.go 436 B

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