Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Hancic (0.18 sec)

  1. cni/pkg/nodeagent/fakes_test.go

    func (f *fakeNs) Close() error {
    	f.closed.Store(true)
    	return nil
    }
    
    func fakeFs() fs.FS {
    	subFs, err := fs.Sub(fakeProc, "testdata")
    	if err != nil {
    		panic(err)
    	}
    	subFs, err = fs.Sub(subFs, "cgroupns")
    	if err != nil {
    		panic(err)
    	}
    	return &fakeFsWithFakeFds{ReadDirFS: subFs.(fs.ReadDirFS)}
    }
    
    type fakeFsWithFakeFds struct {
    	fs.ReadDirFS
    }
    type fakeFileFakeFds struct {
    	fs.File
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  2. operator/cmd/mesh/test-util_test.go

    func (o *ObjectSet) labels(labels ...string) *ObjectSet {
    	ret := &ObjectSet{}
    	for _, obj := range o.objMap {
    		hasAll := true
    		for _, l := range labels {
    			lkv := strings.Split(l, "=")
    			if len(lkv) != 2 {
    				panic("label must have format key=value")
    			}
    			if !hasLabel(obj, lkv[0], lkv[1]) {
    				hasAll = false
    				break
    			}
    		}
    		if hasAll {
    			ret.append(obj)
    		}
    	}
    	return ret
    }
    
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Tue Oct 31 14:48:28 GMT 2023
    - 15.3K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/podcgroupns_test.go

    		Name:      "foo",
    		Namespace: "bar",
    		UID:       types.UID("863b91d4-4b68-4efa-917f-4b560e3e86aa"),
    	}}
    	podUIDNetns, err := n.FindNetnsForPods(map[types.UID]*corev1.Pod{
    		pod.UID: pod,
    	})
    	if err != nil {
    		panic(err)
    	}
    	defer podUIDNetns.Close()
    
    	if len(podUIDNetns) == 0 {
    		t.Fatal("expected to find pod netns")
    	}
    
    	expectedUID := "863b91d4-4b68-4efa-917f-4b560e3e86aa"
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  4. istioctl/pkg/metrics/metrics_test.go

    	if !ok {
    		return prometheus_model.Vector{}, nil, nil
    	}
    	return canned, nil, nil
    }
    
    func (client mockPromAPI) WalReplay(ctx context.Context) (promv1.WalReplayStatus, error) {
    	// TODO implement me
    	panic("implement me")
    }
    
    func (client mockPromAPI) Series(ctx context.Context, matches []string,
    	startTime time.Time, endTime time.Time,
    ) ([]prometheus_model.LabelSet, promv1.Warnings, error) {
    	return nil, nil, nil
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed Oct 25 02:07:44 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  5. operator/cmd/mesh/manifest-generate_test.go

    		d, err := os.MkdirTemp("", "data-snapshot-*")
    		if err != nil {
    			panic(fmt.Errorf("failed to make temp dir: %v", err))
    		}
    		f, err := os.Open("testdata/manifest-generate/data-snapshot.tar.gz")
    		if err != nil {
    			panic(fmt.Errorf("failed to read data snapshot: %v", err))
    		}
    		if err := extract(f, d); err != nil {
    			panic(fmt.Errorf("failed to extract data snapshot: %v", err))
    		}
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Thu Feb 22 08:32:23 GMT 2024
    - 42K bytes
    - Viewed (0)
  6. cni/pkg/nodeagent/server_test.go

    		select {
    		case <-wg.C():
    			return
    		case <-time.After(time.Second):
    			t.Fatal("Wait group timed out!\n")
    		}
    	}
    }
    
    func (wg *WaitGroup) Add(i int32) {
    	select {
    	case <-wg.done:
    		panic("use of an already closed WaitGroup")
    	default:
    	}
    	atomic.AddInt32(&wg.count, i)
    }
    
    func (wg *WaitGroup) Done() {
    	i := atomic.AddInt32(&wg.count, -1)
    	if i == 0 {
    		close(wg.done)
    	}
    }
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  7. istioctl/pkg/writer/envoy/configdump/listener.go

    					cidr := r.AddressPrefix
    					pl := r.PrefixLen.GetValue()
    					if pl != 32 && pl != 128 {
    						cidr += fmt.Sprintf("/%d", pl)
    					}
    					m[cidr] = rm.OnMatch
    				}
    			}
    		default:
    			panic("unhandled")
    		}
    	}
    	outputs := []string{}
    	for k, v := range m {
    		switch v := v.GetOnMatch().(type) {
    		case *matcher.Matcher_OnMatch_Action:
    			if v.Action.GetName() == name {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed Nov 29 12:37:14 GMT 2023
    - 18.1K bytes
    - Viewed (0)
  8. cni/pkg/nodeagent/ztunnelserver_test.go

    	ztun, err := newZtunnelServer(addr, pods)
    	if err != nil {
    		panic(err)
    	}
    	go ztun.Run(ctx)
    
    	// now as a client connect confirm we and get snapshot
    	resolvedAddr, err := net.ResolveUnixAddr("unixpacket", addr)
    	if err != nil {
    		panic(err)
    	}
    	ztunClient, err := net.DialUnix("unixpacket", nil, resolvedAddr)
    	if err != nil {
    		panic(err)
    	}
    
    	// send hello
    	sendHello(ztunClient)
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  9. cni/pkg/plugin/plugin.go

    		loggingOptions.WithTeeToUDS(udsAddress, constants.UDSLogPath)
    	}
    	return loggingOptions
    }
    
    // CmdAdd is called for ADD requests
    func CmdAdd(args *skel.CmdArgs) (err error) {
    	// Defer a panic recover, so that in case if panic we can still return
    	// a proper error to the runtime.
    	defer func() {
    		if e := recover(); e != nil {
    			msg := fmt.Sprintf("istio-cni panicked during cmdAdd: %v\n%v", e, string(debug.Stack()))
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  10. istioctl/pkg/validate/validate_test.go

    spec:
      replicas: 1
    `
    )
    
    func fromYAML(in string) *unstructured.Unstructured {
    	var un unstructured.Unstructured
    	if err := yaml.Unmarshal([]byte(in), &un); err != nil {
    		panic(err)
    	}
    	return &un
    }
    
    func TestValidateResource(t *testing.T) {
    	cases := []struct {
    		name  string
    		in    string
    		valid bool
    		warn  bool
    	}{
    		{
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Jul 25 08:08:36 GMT 2023
    - 21.5K bytes
    - Viewed (0)
Back to top