Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 44 for unsetEnv (0.15 sec)

  1. 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)
  2. 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)
  3. pkg/env/var_test.go

    // in order to generate documentation for these uses.
    package env
    
    import (
    	"os"
    	"testing"
    	"time"
    )
    
    const testVar = "TESTXYZ"
    
    func reset() {
    	_ = os.Unsetenv(testVar)
    	mutex.Lock()
    	allVars = make(map[string]Var)
    	mutex.Unlock()
    }
    
    func TestString(t *testing.T) {
    	reset()
    
    	ev := RegisterStringVar(testVar, "123", "")
    	v, present := ev.Lookup()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 08 16:43:05 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  4. src/cmd/go/go_test.go

    		os.Setenv("GODEBUG", os.Getenv("GODEBUG")+reducedLimit)
    	}
    
    	// Don't let these environment variables confuse the test.
    	os.Setenv("GOENV", "off")
    	os.Unsetenv("GOFLAGS")
    	os.Unsetenv("GOBIN")
    	os.Unsetenv("GOPATH")
    	os.Unsetenv("GIT_ALLOW_PROTOCOL")
    	os.Setenv("HOME", "/test-go-home-does-not-exist")
    	// On some systems the default C compiler is ccache.
    	// Setting HOME to a non-existent directory will break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 81.1K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. src/cmd/dist/build.go

    	// always go to GOROOT/bin anyway.
    	os.Setenv("GOBIN", gorootBin)
    
    	// Make the environment more predictable.
    	os.Setenv("LANG", "C")
    	os.Setenv("LANGUAGE", "en_US.UTF8")
    	os.Unsetenv("GO111MODULE")
    	os.Setenv("GOENV", "off")
    	os.Unsetenv("GOFLAGS")
    	os.Setenv("GOWORK", "off")
    
    	workdir = xworkdir()
    	if err := os.WriteFile(pathf("%s/go.mod", workdir), []byte("module bootstrap"), 0666); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
  9. 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)
  10. src/cmd/go/internal/toolchain/select.go

    	if target := os.Getenv(targetEnv); target != "" && TestVersionSwitch != "loop" {
    		if gover.LocalToolchain() != target {
    			base.Fatalf("toolchain %v invoked to provide %v", gover.LocalToolchain(), target)
    		}
    		os.Unsetenv(targetEnv)
    
    		// Note: It is tempting to check that if gotoolchain != "local"
    		// then target == gotoolchain here, as a sanity check that
    		// the child has made the same version determination as the parent.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:25:05 UTC 2024
    - 23.4K bytes
    - Viewed (0)
Back to top