Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 226 for tempdir (0.3 sec)

  1. cni/pkg/install/kubeconfig_test.go

    		})
    	}
    }
    
    func TestReplaceInvalidKubeconfigFile(t *testing.T) {
    	tmp := t.TempDir()
    	os.WriteFile(filepath.Join(tmp, "token"), []byte(saToken), 0o644)
    	tempDir := t.TempDir()
    
    	cfg := &config.InstallConfig{
    		MountedCNINetDir:      tempDir,
    		KubeCAFile:            kubeCAFilepath,
    		K8sServiceHost:        k8sServiceHost,
    		K8sServicePort:        k8sServicePort,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 17 21:52:29 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  2. cni/pkg/install/cniconfig_test.go

    				// Create temp directory for files
    				tempDir := t.TempDir()
    
    				// Create existing config files if specified in test case
    				for srcFilename, targetFilename := range c.existingConfFiles {
    					if err := file.AtomicCopy(filepath.Join("testdata", srcFilename), tempDir, targetFilename); err != nil {
    						t.Fatal(err)
    					}
    				}
    
    				cfg.MountedCNINetDir = tempDir
    
    				var expectedFilepath string
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 21 18:32:01 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  3. src/os/path_windows_test.go

    	t.Parallel()
    	tmpDir := t.TempDir()
    
    	const prefix = `\\?\`
    	if len(tmpDir) < 4 || tmpDir[:4] != prefix {
    		fullPath, err := syscall.FullPath(tmpDir)
    		if err != nil {
    			t.Fatalf("FullPath(%q) fails: %v", tmpDir, err)
    		}
    		tmpDir = prefix + fullPath
    	}
    	path := tmpDir + `\dir\`
    	if err := os.MkdirAll(path, 0777); err != nil {
    		t.Fatalf("MkdirAll(%q) failed: %v", path, err)
    	}
    
    	path = path + `.\dir2`
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 16:37:32 UTC 2024
    - 8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go

    	baseDir := os.TempDir()
    	tempDir, err := ioutil.TempDir(baseDir, "etcd_certificates")
    	if err != nil {
    		t.Fatal(err)
    	}
    	certFile = path.Join(tempDir, "etcdcert.pem")
    	if err := ioutil.WriteFile(certFile, []byte(testingcert.CertFileContent), 0644); err != nil {
    		t.Fatal(err)
    	}
    	keyFile = path.Join(tempDir, "etcdkey.pem")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 17:57:37 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. src/cmd/link/link_test.go

    	}
    
    	tmpdir := t.TempDir()
    
    	xSrc := filepath.Join(tmpdir, "x.go")
    	pSrc := filepath.Join(tmpdir, "p.go")
    	xObj := filepath.Join(tmpdir, "x.o")
    	pObj := filepath.Join(tmpdir, "p.o")
    	exe := filepath.Join(tmpdir, "x.exe")
    	importcfgfile := filepath.Join(tmpdir, "importcfg")
    	testenv.WriteImportcfg(t, importcfgfile, map[string]string{"p": pObj})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 20:26:02 UTC 2024
    - 43.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/IoTestCase.java

       * the tear-down for this test. Subsequent invocations of this method will return the same
       * directory.
       */
      protected final File getTempDir() throws IOException {
        if (tempDir == null) {
          tempDir = createTempDir();
        }
    
        return tempDir;
      }
    
      /**
       * Creates a new temp file in the temp directory returned by {@link #getTempDir()}. The file will
       * be deleted in the tear-down for this test.
       */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 31 12:36:13 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow_to_stablehlo/python/integration_test/tensorflow_to_stablehlo_test.py

      model.compile(optimizer='sgd', loss='mse')
      model.fit(x_train, y_train, epochs=1)
    
      path = tempdir + '/add_one_model'
      model.save(path)
      return path
    
    
    class TensorflowToStableHLOTest(test.TestCase):
    
      def test_saved_model_to_stablehlo(self):
        with tempfile.TemporaryDirectory() as tempdir:
          path = build_savedmodel(tempdir)
          module_bytecode = tensorflow_to_stablehlo.savedmodel_to_stablehlo(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 22:58:42 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  8. tools/bug-report/pkg/bugreport/bugreport.go

    	}
    	outPath := filepath.Join(outDir, "bug-report.tar.gz")
    
    	if !config.DryRun {
    		common.LogAndPrintf("Creating an archive at %s.\n", outPath)
    		archiveDir := archive.DirToArchive(tempDir)
    		if tempDir != "" {
    			archiveDir = tempDir
    		}
    		curTime = time.Now()
    		err := archive.Create(archiveDir, outPath)
    		fmt.Printf("Time used for creating the tar file is %v.\n", time.Since(curTime))
    		if err != nil {
    			return err
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 05 20:57:29 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  9. testing/performance/src/performanceTest/groovy/org/gradle/performance/regression/corefeature/ArchiveTreePerformanceTest.groovy

    
    class ArchiveTreePerformanceTest extends AbstractCrossVersionPerformanceTest {
        private static TestFile tempDir
        private static TestFile archiveContentsDir
    
        def setupSpec() {
            tempDir = new TestFile("build/tmp/tmp-archive-performance")
            archiveContentsDir = tempDir.file("tmp-archive-contents")
            if (!archiveContentsDir.exists()) {
                generateArchiveContents(archiveContentsDir)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 11:42:52 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  10. src/os/tempfile.go

    // Multiple programs or goroutines calling CreateTemp simultaneously will not choose the same file.
    // The caller can use the file's Name method to find the pathname of the file.
    // It is the caller's responsibility to remove the file when it is no longer needed.
    func CreateTemp(dir, pattern string) (*File, error) {
    	if dir == "" {
    		dir = TempDir()
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 18:04:39 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top