Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for unsetEnv (0.13 sec)

  1. cmd/update_test.go

    		}
    		if !strings.Contains(str, expectedStr) {
    			t.Errorf("Test %d: expected: %s, got: %s", i+1, expectedStr, str)
    		}
    		globalIsCICD = sci
    		os.Unsetenv("MARATHON_APP_LABEL_DCOS_PACKAGE_VERSION")
    		os.Unsetenv(testCase.envName)
    	}
    }
    
    // Tests if the environment we are running is in DCOS.
    func TestIsDCOS(t *testing.T) {
    	sci := globalIsCICD
    	globalIsCICD = false
    	defer func() {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Mar 09 03:07:08 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  2. pkg/probe/http/http_test.go

    	"k8s.io/apimachinery/pkg/util/wait"
    	"k8s.io/kubernetes/pkg/probe"
    )
    
    const FailureCode int = -1
    
    func unsetEnv(t testing.TB, key string) {
    	if originalValue, ok := os.LookupEnv(key); ok {
    		t.Cleanup(func() { os.Setenv(key, originalValue) })
    		os.Unsetenv(key)
    	}
    }
    
    func TestHTTPProbeProxy(t *testing.T) {
    	res := "welcome to http probe proxy"
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 18 01:40:08 UTC 2023
    - 15.7K bytes
    - Viewed (0)
  3. internal/kms/config.go

    	if isPresent(EnvKMSSecretKey) && os.Getenv(EnvKMSSecretKey) == "" {
    		os.Unsetenv(EnvKMSSecretKey)
    	}
    	if isPresent(EnvKMSSecretKeyFile) {
    		if filename := os.Getenv(EnvKMSSecretKeyFile); filename == "" {
    			os.Unsetenv(EnvKMSSecretKeyFile)
    		} else if _, err := os.Stat(filename); errors.Is(err, os.ErrNotExist) {
    			os.Unsetenv(EnvKMSSecretKeyFile)
    		}
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 12 14:31:26 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  4. tensorflow/c/eager/c_api_cluster_test.cc

      TFE_DeleteContext(ctx);
      TF_DeleteStatus(status);
    
      // TODO(b/136478427): Figure out how to correctly shut the server down.
      worker_server.release();
      tensorflow::unsetenv("GRPC_FAIL_FAST");
    }
    
    TEST(CAPI, RemoteExecuteUpdateServerDefWithFailures) {
      TestRemoteExecuteUpdateServerDefWithFailures(false);
    }
    
    TEST(CAPI, RemoteExecuteUpdateServerDefWithFailuresAsync) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 14 10:03:59 UTC 2023
    - 19.3K bytes
    - Viewed (0)
  5. internal/config/certs_test.go

    			t.Fatalf("certs: expected = %v, got = %v", testCase.expectedResultLen, len(certs))
    		}
    	}
    }
    
    func TestLoadX509KeyPair(t *testing.T) {
    	t.Cleanup(func() {
    		os.Unsetenv(EnvCertPassword)
    	})
    	for i, testCase := range loadX509KeyPairTests {
    		privateKey, err := createTempFile("private.key", testCase.privateKey)
    		if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 21.6K bytes
    - Viewed (0)
  6. api/go1.4.txt

    pkg net/http/httputil, type ReverseProxy struct, ErrorLog *log.Logger
    
    # CL 148370043 os, syscall: add Unsetenv, Brad Fitzpatrick <******@****.***>
    pkg os, func Unsetenv(string) error
    pkg syscall, func Unsetenv(string) error
    
    # CL 144020043 reflect: add Type.Comparable, Russ Cox <******@****.***>
    pkg reflect, type Type interface, Comparable() bool
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 12 03:01:01 UTC 2014
    - 34K bytes
    - Viewed (0)
  7. src/cmd/go/internal/vcs/vcs_test.go

    		{vcsGit, "foo://example.com/bar.git", true},
    		{vcsHg, "foo://example.com/bar.hg", false},
    		{vcsSvn, "foo://example.com/svn", false},
    		{vcsBzr, "foo://example.com/bar.bzr", false},
    	}
    
    	defer os.Unsetenv("GIT_ALLOW_PROTOCOL")
    	os.Setenv("GIT_ALLOW_PROTOCOL", "https:foo")
    	for _, test := range tests {
    		secure := test.vcs.IsSecure(test.url)
    		if secure != test.secure {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 03 15:33:59 UTC 2022
    - 17K bytes
    - Viewed (0)
  8. src/testing/testing_test.go

    	}
    
    	for _, test := range tests {
    		if test.initialValueExists {
    			if err := os.Setenv(test.key, test.initialValue); err != nil {
    				t.Fatalf("unable to set env: got %v", err)
    			}
    		} else {
    			os.Unsetenv(test.key)
    		}
    
    		t.Run(test.name, func(t *testing.T) {
    			t.Setenv(test.key, test.newValue)
    			if os.Getenv(test.key) != test.newValue {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:10:41 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/preflight/checks_test.go

    func resetProxyEnv(t *testing.T) {
    	for _, e := range os.Environ() {
    		key, value, _ := strings.Cut(e, "=")
    		if strings.HasSuffix(strings.ToLower(key), "_proxy") {
    			t.Cleanup(func() { os.Setenv(key, value) })
    			os.Unsetenv(key)
    		}
    	}
    
    	t.Setenv("HTTP_PROXY", "http://proxy.example.com:3128")
    	t.Setenv("HTTPS_PROXY", "https://proxy.example.com:3128")
    	t.Setenv("NO_PROXY", "example.com,10.0.0.0/8,2001:db8::/48")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 06:58:01 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  10. cmd/common-main.go

    		}
    	}
    	return m
    }
    
    func initConsoleServer() (*consoleapi.Server, error) {
    	// unset all console_ environment variables.
    	for _, cenv := range env.List(consolePrefix) {
    		os.Unsetenv(cenv)
    	}
    
    	// enable all console environment variables
    	minioConfigToConsoleFeatures()
    
    	// set certs dir to minio directory
    	consoleCerts.GlobalCertsDir = &consoleCerts.ConfigDir{
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 30 11:58:12 UTC 2024
    - 31.5K bytes
    - Viewed (0)
Back to top