Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 579 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 Apr 17 22:53:10 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 Apr 17 22:53:10 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 Apr 17 22:53:10 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 14.3K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt

      /** Sets the results for `hostname`.  */
      operator fun set(
        hostname: String,
        addresses: List<InetAddress>,
      ): FakeDns {
        hostAddresses[hostname] = addresses
        return this
      }
    
      /** Clears the results for `hostname`.  */
      fun clear(hostname: String): FakeDns {
        hostAddresses.remove(hostname)
        return this
      }
    
      @Throws(UnknownHostException::class)
      fun lookup(
        hostname: String,
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  5. cni/pkg/plugin/cnieventclient_test.go

    	ContainerID: "bbb-eee-www",
    }
    
    var (
    	fakeIP                 = net.ParseIP("99.9.9.9")
    	fakeGW                 = net.ParseIP("88.9.9.9")
    	fakeIDX                = 0
    	fakePrevResultIPConfig = cniv1.IPConfig{
    		Interface: &fakeIDX,
    		Address: net.IPNet{
    			IP: fakeIP,
    		},
    		Gateway: fakeGW,
    	}
    )
    
    func TestPushCNIAddEventSucceed(t *testing.T) {
    Go
    - Registered: Wed Apr 17 22:53:10 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  6. 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 Apr 17 22:53:10 GMT 2024
    - Last Modified: Thu Feb 08 01:03:24 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        class FakeOp implements Runnable {
          final int op;
    
          FakeOp(int op) {
            this.op = op;
          }
    
          @Override
          public void run() {
            callOrder.add(op);
          }
        }
    
        e.execute(new FakeOp(0));
        e.execute(new FakeOp(1));
        e.execute(new FakeOp(2));
        fakePool.runAll();
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  8. cni/pkg/nodeagent/server_test.go

    	server := &fakeServer{}
    	server.Start(fakeCtx)
    
    	server.On("DelPodFromMesh",
    		fakeCtx,
    		pod,
    	).Return(errors.New("fake error"))
    
    	fakeClientSet := fake.NewSimpleClientset()
    	m := meshDataplane{
    		kubeClient: fakeClientSet,
    		netServer:  server,
    	}
    
    	// pod is not in fake client, so if this will try to remove annotation, it will fail.
    	err := m.DelPodFromMesh(fakeCtx, pod)
    	assert.Error(t, err)
    }
    
    Go
    - Registered: Wed Apr 17 22:53:10 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/testing/ClusterException.java

       *   <li>Otherwise, return an instance of {@link ClusterException} that wraps the first exception
       *       in the {@code exceptions} collection.
       * </ul>
       *
       * <p>Though this method takes any {@link Collection}, it often makes most sense to pass a {@link
       * java.util.List} or some other collection that preserves the order in which the exceptions got
       * added.
       *
       * @throws NullPointerException if {@code exceptions} is null
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java

      }
    
      // TODO(cpovirk): instead of skipping, use a smaller number of steps
      @GwtIncompatible // works but takes 5 minutes to run
      public void testPeekingIteratorBehavesLikeIteratorOnThreeElementIterable() {
        actsLikeIteratorHelper(Lists.newArrayList("A", "B", "C"));
      }
    
      @GwtIncompatible // works but takes 5 minutes to run
      public void testPeekingIteratorAcceptsNullElements() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 9K bytes
    - Viewed (0)
Back to top