Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 228 for mkdtemp (0.26 sec)

  1. src/cmd/cgo/internal/teststdio/stdio_test.go

    	"os/exec"
    	"path/filepath"
    	"strings"
    	"testing"
    )
    
    func TestMain(m *testing.M) {
    	log.SetFlags(log.Lshortfile)
    	os.Exit(testMain(m))
    }
    
    func testMain(m *testing.M) int {
    	GOPATH, err := os.MkdirTemp("", "cgostdio")
    	if err != nil {
    		log.Panic(err)
    	}
    	defer os.RemoveAll(GOPATH)
    	os.Setenv("GOPATH", GOPATH)
    
    	// Copy testdata into GOPATH/src/cgostdio, along with a go.mod file
    	// declaring the same path.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 22 20:56:09 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/config/joinconfiguration_test.go

    import (
    	"os"
    	"path/filepath"
    	"testing"
    
    	"github.com/lithammer/dedent"
    )
    
    func TestLoadJoinConfigurationFromFile(t *testing.T) {
    	// Create temp folder for the test case
    	tmpdir, err := os.MkdirTemp("", "")
    	if err != nil {
    		t.Fatalf("Couldn't create tmpdir: %v", err)
    	}
    	defer os.RemoveAll(tmpdir)
    
    	// cfgFiles is in cluster_test.go
    	var tests = []struct {
    		name         string
    		fileContents string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 13 09:17:03 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  3. src/cmd/internal/obj/x86/pcrelative_test.go

    RET
    `
    
    const goData = `
    package main
    
    func testASM()
    
    func main() {
    	testASM()
    }
    `
    
    func objdumpOutput(t *testing.T, mname, source string) []byte {
    	tmpdir, err := os.MkdirTemp("", mname)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.RemoveAll(tmpdir)
    	err = os.WriteFile(filepath.Join(tmpdir, "go.mod"), []byte(fmt.Sprintf("module %s\n", mname)), 0666)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 23:16:01 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  4. src/cmd/internal/obj/loong64/asm_test.go

    // branch, in order to ensure that it assembles successfully.
    func TestLargeBranch(t *testing.T) {
    	if testing.Short() {
    		t.Skip("Skipping test in short mode")
    	}
    	testenv.MustHaveGoBuild(t)
    
    	dir, err := os.MkdirTemp("", "testlargebranch")
    	if err != nil {
    		t.Fatalf("Could not create directory: %v", err)
    	}
    	defer os.RemoveAll(dir)
    
    	// Generate a very large function.
    	buf := bytes.NewBuffer(make([]byte, 0, genBufSize))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:39:37 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  5. pkg/kubelet/config/file_test.go

    	if !apiequality.Semantic.DeepEqual(expected, update) {
    		t.Fatalf("expected %#v, got %#v", expected, update)
    	}
    }
    
    func mkTempDir(prefix string) (string, error) {
    	return os.MkdirTemp(os.TempDir(), prefix)
    }
    
    func removeAll(dir string, t *testing.T) {
    	if err := os.RemoveAll(dir); err != nil {
    		t.Fatalf("unable to remove dir %s: %v", dir, err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 30 03:35:26 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  6. pkg/kubelet/volumemanager/reconciler/reconstruct_test.go

    			expectedVolumesNeedDevicePath:       []string{},
    			expectedVolumesFailedReconstruction: []string{"pvc-abcdef"},
    		},
    	}
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			tmpKubeletDir, err := os.MkdirTemp("", "")
    			if err != nil {
    				t.Fatalf("can't make a temp directory for kubeletPods: %v", err)
    			}
    			defer os.RemoveAll(tmpKubeletDir)
    
    			// create kubelet pod directory
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/phases/upgrade/staticpods_test.go

    			tmpKubernetesDir := pathMgr.(*fakeStaticPodPathManager).KubernetesDir()
    
    			tempCertsDir, err := os.MkdirTemp("", "kubeadm-certs")
    			if err != nil {
    				t.Fatalf("couldn't create temporary certificates directory: %v", err)
    			}
    			defer os.RemoveAll(tempCertsDir)
    			tmpEtcdDataDir, err := os.MkdirTemp("", "kubeadm-etcd-data")
    			if err != nil {
    				t.Fatalf("couldn't create temporary etcd data directory: %v", err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 01 07:10:31 UTC 2024
    - 32K bytes
    - Viewed (0)
  8. prow/integ-suite-kind.sh

    if [[ -z "${SKIP_BUILD:-}" ]]; then
      HUB="${KIND_REGISTRY}"
      export HUB
    fi
    
    # Setup junit report and verbose logging
    export T="${T:-"-v -count=1"}"
    export CI="true"
    
    export ARTIFACTS="${ARTIFACTS:-$(mktemp -d)}"
    trace "init" make init
    
    if [[ -z "${SKIP_SETUP:-}" ]]; then
      export DEFAULT_CLUSTER_YAML="./prow/config/default.yaml"
      export METRICS_SERVER_CONFIG_DIR='./prow/config/metrics'
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 18 05:42:41 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/cmd/token_test.go

    		t.Errorf("Cannot execute token command: %v", err)
    	}
    }
    
    func TestNewCmdToken(t *testing.T) {
    	var buf, bufErr bytes.Buffer
    	testConfigTokenFile := "test-config-file"
    
    	tmpDir, err := os.MkdirTemp("", "kubeadm-token-test")
    	if err != nil {
    		t.Errorf("Unable to create temporary directory: %v", err)
    	}
    	defer os.RemoveAll(tmpDir)
    	fullPath := filepath.Join(tmpDir, testConfigTokenFile)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 05:47:48 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  10. cmd/kubemark/app/hollow_node_test.go

    // Such test is sufficient to detect e.g. missing kubelet dependencies that are not added in
    // pkg/kubemark/hollow_kubelet.go.
    func TestHollowNode(t *testing.T) {
    	// temp dir
    	tmpDir, err := os.MkdirTemp("", "hollow-node")
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.RemoveAll(tmpDir)
    
    	// https server
    	server := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 10:06:15 UTC 2024
    - 2.3K bytes
    - Viewed (0)
Back to top