Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 85 for fakefs (0.17 sec)

  1. cni/pkg/nodeagent/fakes_test.go

    	return nil
    }
    
    // fakeNs is a mock struct for testing
    type fakeNs struct {
    	closed *atomic.Bool
    	fd     uintptr
    	inode  uint64
    }
    
    func newFakeNs(fd uintptr) *fakeNs {
    	// the fake inode is the fd! magic.
    	return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: uint64(fd)}
    }
    
    func newFakeNsInode(fd uintptr, inode uint64) *fakeNs {
    	return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: inode}
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/podcgroupns_test.go

    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/types"
    
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestWithProcFs(t *testing.T) {
    	n := NewPodNetnsProcFinder(fakeFs())
    	pod := &corev1.Pod{ObjectMeta: metav1.ObjectMeta{
    		Name:      "foo",
    		Namespace: "bar",
    		UID:       types.UID("863b91d4-4b68-4efa-917f-4b560e3e86aa"),
    	}}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/net_test.go

    		},
    		Spec: corev1.PodSpec{ServiceAccountName: "sa"},
    	}
    
    	// this is usually called after add. so manually add the pod uid for now
    	fakens := newFakeNs(123)
    	closed := fakens.closed
    	workload := WorkloadInfo{
    		Workload: podToWorkload(pod),
    		Netns:    fakens,
    	}
    	fixture.podNsMap.UpsertPodCacheWithNetns(string(pod.UID), workload)
    	err := netServer.RemovePodFromMesh(ctx, pod)
    	assert.NoError(t, err)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/informers.go

    	//
    	// NOTE that we are requeueing namespaces here explicitly to work around
    	// test flakes with the fake kube client in `pkg/kube/client.go` -
    	// because we are using `List()` in the handler, without this requeue,
    	// the fake client will sometimes drop pod events leading to test flakes.
    	//
    	// WaitForCacheSync *helps*, but does not entirely fix this problem
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 08 01:03:24 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  5. cni/pkg/nodeagent/ztunnelserver_test.go

    	}
    	sendAck(ztunClient)
    
    	ztunClient.Close()
    	// this will retry for a bit, so shouldn't flake
    	mt.Assert(ztunnelConnected.Name(), nil, monitortest.Exactly(0))
    }
    
    func podAndNetns() (*v1.Pod, *fakeNs) {
    	devNull, err := os.Open(os.DevNull)
    	if err != nil {
    		panic(err)
    	}
    	// we can't close this now, because we need to pass it from the ztunnel server to the client
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  6. misc/go_android_exec/exitcode_test.go

    	"regexp"
    	"strings"
    	"testing"
    )
    
    func TestExitCodeFilter(t *testing.T) {
    	// Write text to the filter one character at a time.
    	var out strings.Builder
    	f, exitStr := newExitCodeFilter(&out)
    	// Embed a "fake" exit code in the middle to check that we don't get caught on it.
    	pre := "abc" + exitStr + "123def"
    	text := pre + exitStr + `1`
    	for i := 0; i < len(text); i++ {
    		_, err := f.Write([]byte{text[i]})
    		if err != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed May 03 14:54:58 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  7. src/archive/zip/writer.go

    		return errors.New("archive/zip: invalid duplicate FileHeader")
    	}
    	return nil
    }
    
    // CreateHeader adds a file to the zip archive using the provided [FileHeader]
    // for the file metadata. [Writer] takes ownership of fh and may mutate
    // its fields. The caller must not modify fh after calling [Writer.CreateHeader].
    //
    // This returns a [Writer] to which the file contents should be written.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  8. src/cmd/asm/internal/arch/arm64.go

    	"BGT":   true,
    	"BLE":   true,
    	"CALL":  true,
    	"CBZ":   true,
    	"CBZW":  true,
    	"CBNZ":  true,
    	"CBNZW": true,
    	"JMP":   true,
    	"TBNZ":  true,
    	"TBZ":   true,
    
    	// ADR isn't really a jump, but it takes a PC or label reference,
    	// which needs to patched like a jump.
    	"ADR":  true,
    	"ADRP": true,
    }
    
    func jumpArm64(word string) bool {
    	return arm64Jump[word]
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Sep 29 09:04:58 GMT 2022
    - 10.4K bytes
    - Viewed (0)
  9. internal/bucket/lifecycle/lifecycle.go

    				// Indicates whether MinIO will remove a delete marker with no noncurrent versions.
    				// Only latest marker is removed. If set to true, the delete marker will be expired;
    				// if set to false the policy takes no action. This cannot be specified with Days or
    				// Date in a Lifecycle Expiration Policy.
    				events = append(events, Event{
    					Action: DeleteVersionAction,
    					RuleID: rule.ID,
    					Due:    now,
    				})
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 09 06:41:22 GMT 2024
    - 17K bytes
    - Viewed (0)
  10. istioctl/pkg/kubeinject/kubeinject.go

    				return c.Parent().PersistentPreRunE(c, args)
    			}
    
    			return nil
    		},
    	}
    
    	injectCmd.PersistentFlags().StringVar(&meshConfigFile, "meshConfigFile", "",
    		"Mesh configuration filename. Takes precedence over --meshConfigMapName if set")
    	injectCmd.PersistentFlags().StringVar(&injectConfigFile, "injectConfigFile", "",
    		"Injection configuration filename. Cannot be used with --injectConfigMapName")
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Mar 29 02:29:02 GMT 2024
    - 21.6K bytes
    - Viewed (0)
Back to top