Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 101 for fakefs (0.19 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. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

                activeThreads--
                startNextTask()
              }
            }
          }
        }
      }
    
      /**
       * This blocking queue hooks into a fake clock rather than using regular JVM timing for functions
       * like [poll]. It is only usable within task faker tasks.
       */
      private inner class TaskFakerBlockingQueue<T>(
        val delegate: BlockingQueue<T>,
      ) : AbstractQueue<T>(), BlockingQueue<T> {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  5. docs/en/docs/async.md

    Next, it 🤖 takes the first task to finish (let's say, our "slow-file" 📝) and continues whatever it had to do with it.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/dependencies/index.md

    This parameter must be something like a function.
    
    You **don't call it** directly (don't add the parenthesis at the end), you just pass it as a parameter to `Depends()`.
    
    And that function takes parameters in the same way that *path operation functions* do.
    
    !!! tip
        You'll see what other "things", apart from functions, can be used as dependencies in the next chapter.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  7. architecture/ambient/ztunnel.md

    Ztunnel was not designed to be a feature-rich data plane.
    Quite the opposite - an *aggressively* small feature set is the key feature that makes ztunnel viable.
    It very intentionally does not offer L7 (HTTP) functionality, for instance, which would likely violate some of the goals above, without contributing to them.
    Plain Text
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Apr 25 22:35:16 GMT 2024
    - 16.6K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/events.md

    In our code example above, we don't use it directly, but we pass it to FastAPI for it to use it.
    
    The `lifespan` parameter of the `FastAPI` app takes an **async context manager**, so we can pass our new `lifespan` async context manager to it.
    
    ```Python hl_lines="22"
    {!../../../docs_src/events/tutorial003.py!}
    ```
    
    ## Alternative Events (deprecated)
    
    !!! warning
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. docs/en/docs/reference/request.md

    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import Request
    ```
    
    !!! tip
        When you want to define dependencies that should be compatible with both HTTP and WebSockets, you can define a parameter that takes an `HTTPConnection` instead of a `Request` or a `WebSocket`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 516 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_dependencies/test_tutorial012_an.py

        response = client.get(
            "/items/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"}
        )
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Key header invalid"}
    
    
    def test_get_invalid_second_header_users():
        response = client.get(
            "/users/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"}
        )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.4K bytes
    - Viewed (0)
Back to top