- Sort Score
- Result 10 results
- Languages All
Results 151 - 160 of 228 for mkdtemp (0.1 sec)
-
src/cmd/internal/archive/archive_test.go
go1obj string go2obj string goarchive string cgoarchive string } func buildGoobj(t *testing.T) goobjPaths { buildOnce.Do(func() { buildErr = func() (err error) { buildDir, err = os.MkdirTemp("", "TestGoobj") if err != nil { return err } go1obj := filepath.Join(buildDir, "go1.o") go2obj := filepath.Join(buildDir, "go2.o") goarchive := filepath.Join(buildDir, "go.a")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 02 19:27:33 UTC 2023 - 7.9K bytes - Viewed (0) -
pkg/kubelet/prober/scale_test.go
http bool // it can be tcp or http }{ {"TCP", false}, {"HTTP", true}, } for _, tt := range tests { t.Run(fmt.Sprintf(tt.name), func(t *testing.T) { testRootDir := "" if tempDir, err := os.MkdirTemp("", "kubelet_test."); err != nil { t.Fatalf("can't make a temp rootdir: %v", err) } else { testRootDir = tempDir } podManager := kubepod.NewBasicPodManager()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Aug 16 16:33:01 UTC 2023 - 8.2K bytes - Viewed (0) -
src/html/template/examplefiles_test.go
// templateFile defines the contents of a template to be stored in a file, for testing. type templateFile struct { name string contents string } func createTestDir(files []templateFile) string { dir, err := os.MkdirTemp("", "template") if err != nil { log.Fatal(err) } for _, file := range files { f, err := os.Create(filepath.Join(dir, file.name)) if err != nil { log.Fatal(err) } defer f.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 09 19:12:23 UTC 2020 - 7.5K bytes - Viewed (0) -
pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher_test.go
} func initTempDir(t *testing.T) string { // Creating a different directory. os.RemoveAll is not atomic enough; // os.MkdirAll can get into an "Access Denied" error on Windows. d, err := os.MkdirTemp("", "plugin_test") if err != nil { t.Fatalf("Could not create a temp directory %s: %v", d, err) } return d } func waitForRegistration( t *testing.T, socketPath string,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Aug 04 06:56:50 UTC 2023 - 8K bytes - Viewed (0) -
cmd/utils.go
prof.ext = "pprof" // Enable profiler and set the name of the file that pkg/pprof // library creates to store profiling data. switch madmin.ProfilerType(profilerType) { case madmin.ProfilerCPU: dirPath, err := os.MkdirTemp("", "profile") if err != nil { return nil, err } fn := filepath.Join(dirPath, "cpu.out") f, err := Create(fn) if err != nil { return nil, err } err = pprof.StartCPUProfile(f)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Jun 05 22:00:34 UTC 2024 - 31.9K bytes - Viewed (0) -
pkg/volume/util/hostutil/hostutil_linux_test.go
if test.expectedResult != out { t.Errorf("Test %s failed: expected %v, got %v", test.name, test.expectedResult, out) } } } func writeFile(content string) (string, string, error) { tempDir, err := os.MkdirTemp("", "mounter_shared_test") if err != nil { return "", "", err } filename := filepath.Join(tempDir, "mountinfo") err = os.WriteFile(filename, []byte(content), 0600) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 20 14:49:03 UTC 2023 - 8K bytes - Viewed (0) -
src/cmd/go/internal/modload/query_test.go
cfg.ModCacheRW = true srv, err := vcstest.NewServer() if err != nil { return err } defer func() { if closeErr := srv.Close(); err == nil { err = closeErr } }() dir, err := os.MkdirTemp("", "modload-test-") if err != nil { return err } defer func() { if rmErr := os.RemoveAll(dir); err == nil { err = rmErr } }() os.Setenv("GOPATH", dir) cfg.BuildContext.GOPATH = dir
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 06 17:53:14 UTC 2023 - 8.7K bytes - Viewed (0) -
cmd/kubeadm/app/cmd/init_test.go
contexts: - name: foo-context context: cluster: foo-cluster current-context: foo-context kind: Config ` func TestNewInitData(t *testing.T) { // create temp directory tmpDir, err := os.MkdirTemp("", "kubeadm-init-test") if err != nil { t.Errorf("Unable to create temporary directory: %v", err) } defer os.RemoveAll(tmpDir) // create config file
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 19 12:26:20 UTC 2024 - 11.9K bytes - Viewed (0) -
pkg/kubelet/pluginmanager/reconciler/reconciler_test.go
reconcilerLoopSleepDuration time.Duration = 1 * time.Nanosecond ) var ( socketDir string supportedVersions = []string{"v1beta1", "v1beta2"} ) func init() { d, err := os.MkdirTemp("", "reconciler_test") if err != nil { panic(fmt.Sprintf("Could not create a temp directory: %s", d)) } socketDir = d } func cleanup(t *testing.T) { require.NoError(t, os.RemoveAll(socketDir))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Mar 16 14:21:15 UTC 2024 - 10.5K bytes - Viewed (0) -
hack/lib/util.sh
} # Create a temp dir that'll be deleted at the end of this bash session. # # Vars set: # KUBE_TEMP kube::util::ensure-temp-dir() { if [[ -z ${KUBE_TEMP-} ]]; then KUBE_TEMP=$(mktemp -d 2>/dev/null || mktemp -d -t kubernetes.XXXXXX) kube::util::trap_add kube::util::cleanup-temp-dir EXIT fi } kube::util::host_os() { local host_os case "$(uname -s)" in Darwin) host_os=darwin
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:07:33 UTC 2024 - 25.9K bytes - Viewed (0)