Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for CreateTmpDirectory (0.43 sec)

  1. pkg/test/framework/resource/context.go

    	CleanupStrategy(strategy cleanup.Strategy, fn func())
    
    	// CreateDirectory creates a new subdirectory within this context.
    	CreateDirectory(name string) (string, error)
    
    	// CreateTmpDirectory creates a new temporary directory within this context.
    	CreateTmpDirectory(prefix string) (string, error)
    
    	// ConfigKube returns a Context that writes config to the provided clusters. If
    	// no clusters are provided, writes to all clusters in the mesh.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  2. tests/integration/operator/operator_dumper.go

    func (d *operatorDumper) Dump(ctx resource.Context) {
    	scopes.Framework.Errorf("=== Dumping Istio Deployment State for %v...", ctx.ID())
    	ns := d.ns
    	if len(ns) < 1 {
    		ns = "istio-operator"
    	}
    
    	dir, err := ctx.CreateTmpDirectory("istio-operator-" + d.ID().String())
    	if err != nil {
    		scopes.Framework.Errorf("Unable to create directory for dumping operator contents: %v", err)
    		return
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 29 14:15:33 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  3. pkg/test/framework/suitecontext.go

    	} else {
    		scopes.Framework.Debugf("Created a temp dir: runID='%s', name='%s'", c.settings.RunID, dir)
    	}
    	return dir, err
    }
    
    // CreateTmpDirectory creates a new temporary directory with the given prefix.
    func (c *suiteContext) CreateTmpDirectory(prefix string) (string, error) {
    	if len(prefix) != 0 && !strings.HasSuffix(prefix, "-") {
    		prefix += "-"
    	}
    
    	dir, err := os.MkdirTemp(c.workDir, prefix)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  4. tests/integration/operator/uninstall_test.go

    			// For positive casse, use minimal profile, iop file will be deleted
    			t.NewSubTest("delete-iop-success").Run(func(t framework.TestContext) {
    				istioCtl := istioctl.NewOrFail(t, t, istioctl.Config{})
    				workDir, err := t.CreateTmpDirectory("operator-controller-test")
    				if err != nil {
    					t.Fatal("failed to create test directory")
    				}
    				cs := t.Clusters().Default()
    				cleanupInClusterCRs(t, cs)
    				t.Cleanup(func() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 10 20:33:28 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  5. pkg/test/framework/testcontext.go

    	tmp, err := c.CreateDirectory(name)
    	if err != nil {
    		c.Fatalf("Error creating  directory with name %q: %v", name, err)
    	}
    	return tmp
    }
    
    func (c *testContext) CreateTmpDirectory(prefix string) (string, error) {
    	dir, err := os.MkdirTemp(c.workDir, prefix)
    	if err != nil {
    		scopes.Framework.Errorf("Error creating temp dir: runID='%v', prefix='%s', workDir='%v', err='%v'",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  6. pkg/test/framework/components/istio/cleanup.go

    		f.Close()
    	}
    	return nil
    }
    
    func (i *istioImpl) Dump(ctx resource.Context) {
    	scopes.Framework.Errorf("=== Dumping Istio Deployment State for %v...", ctx.ID())
    	ns := i.cfg.SystemNamespace
    	d, err := ctx.CreateTmpDirectory("istio-state")
    	if err != nil {
    		scopes.Framework.Errorf("Unable to create directory for dumping Istio contents: %v", err)
    		return
    	}
    	g := errgroup.Group{}
    	g.Go(func() error {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. tests/integration/helm/install_test.go

    	check func(t framework.TestContext), revision string,
    ) func(t framework.TestContext) {
    	return func(t framework.TestContext) {
    		workDir, err := t.CreateTmpDirectory("helm-install-test")
    		if err != nil {
    			t.Fatal("failed to create test directory")
    		}
    		cs := t.Clusters().Default().(*kubecluster.Cluster)
    		h := helm.New(cs.Filename())
    		s := t.Settings()
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 19:04:51 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  8. pkg/test/framework/components/namespace/kube.go

    		scopes.Framework.Debugf("=== Skip dumping Namespace %s State for %v...", n.name, ctx.ID())
    		return
    	}
    	scopes.Framework.Errorf("=== Dumping Namespace %s State for %v...", n.name, ctx.ID())
    
    	d, err := ctx.CreateTmpDirectory(n.name + "-state")
    	if err != nil {
    		scopes.Framework.Errorf("Unable to create directory for dumping %s contents: %v", n.name, err)
    		return
    	}
    
    	kube2.DumpPods(n.ctx, d, n.name, []string{})
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 9K bytes
    - Viewed (0)
  9. tests/integration/security/ca_custom_root/main_test.go

    			serverNakedFooAlt = apps.EchoNamespace.All[index]
    		}
    	}
    	return nil
    }
    
    func SetupApps(ctx resource.Context, customNs namespace.Getter, customCfg *[]echo.Config) error {
    	tmpdir, err := ctx.CreateTmpDirectory("ca-custom-root")
    	if err != nil {
    		return err
    	}
    
    	// Create testing certs using runtime namespace.
    	err = generateCerts(tmpdir, customNs.Get().Name())
    	if err != nil {
    		return err
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 02 21:29:40 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  10. tests/integration/operator/switch_cr_test.go

    )
    
    func TestController(t *testing.T) {
    	framework.
    		NewTest(t).
    		Run(func(t framework.TestContext) {
    			istioCtl := istioctl.NewOrFail(t, t, istioctl.Config{})
    			workDir, err := t.CreateTmpDirectory("operator-controller-test")
    			if err != nil {
    				t.Fatal("failed to create test directory")
    			}
    			cs := t.Clusters().Default()
    			cleanupInClusterCRs(t, cs)
    			t.Cleanup(func() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 10 20:33:28 UTC 2024
    - 17.5K bytes
    - Viewed (0)
Back to top