Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,077 for test (0.33 sec)

  1. operator/cmd/mesh/test-util_test.go

    }
    
    func mustSelect(t test.Failer, selector map[string]string, labels map[string]string) {
    	t.Helper()
    	kselector := labels2.Set(selector).AsSelectorPreValidated()
    	if !kselector.Matches(labels2.Set(labels)) {
    		t.Fatalf("%v does not select %v", selector, labels)
    	}
    }
    
    func mustNotSelect(t test.Failer, selector map[string]string, labels map[string]string) {
    	t.Helper()
    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)
  2. internal/crypto/metadata_test.go

    			if err.Error() != test.ExpectedErr.Error() {
    				t.Errorf("Test %d: got error '%v' - want error '%v'", i, err, test.ExpectedErr)
    			}
    		}
    		if !bytes.Equal(dataKey, test.DataKey) {
    			t.Errorf("Test %d: got data key '%v' - want data key '%v'", i, dataKey, test.DataKey)
    		}
    		if keyID != test.KeyID {
    			t.Errorf("Test %d: got key-ID '%v' - want key-ID '%v'", i, keyID, test.KeyID)
    		}
    		if sealedKey.Algorithm != test.SealedKey.Algorithm {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Feb 02 00:13:57 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  3. internal/dsync/dsync_test.go

    	os.Exit(code)
    }
    
    func TestSimpleLock(t *testing.T) {
    	dm := NewDRWMutex(ds, "test")
    
    	dm.Lock(id, source)
    
    	// fmt.Println("Lock acquired, waiting...")
    	time.Sleep(testDrwMutexRefreshCallTimeout)
    
    	dm.Unlock(context.Background())
    }
    
    func TestSimpleLockUnlockMultipleTimes(t *testing.T) {
    	dm := NewDRWMutex(ds, "test")
    
    	dm.Lock(id, source)
    	time.Sleep(time.Duration(10+(rand.Float32()*50)) * time.Millisecond)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 11K bytes
    - Viewed (0)
  4. istioctl/pkg/workload/workload_test.go

    	"github.com/spf13/cobra"
    	v1 "k8s.io/api/core/v1"
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    
    	"istio.io/istio/istioctl/pkg/cli"
    	"istio.io/istio/pilot/test/util"
    	"istio.io/istio/pkg/config/constants"
    	"istio.io/istio/pkg/kube"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    var fakeCACert = []byte("fake-CA-cert")
    
    var (
    	defaultYAML = `apiVersion: networking.istio.io/v1alpha3
    kind: WorkloadGroup
    metadata:
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed Mar 27 16:59:05 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  5. tests/test_annotated.py

            ("/unrelated", 422, foo_is_missing),
        ],
    )
    def test_get(path, expected_status, expected_response):
        response = client.get(path)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_multiple_path():
        app = FastAPI()
    
        @app.get("/test1")
        @app.get("/test2")
        async def test(var: Annotated[str, Query()] = "bar"):
            return {"foo": var}
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  6. cni/pkg/install/cniconfig_test.go

    package install
    
    import (
    	"context"
    	"os"
    	"path/filepath"
    	"testing"
    	"time"
    
    	"istio.io/istio/cni/pkg/config"
    	testutils "istio.io/istio/pilot/test/util"
    	"istio.io/istio/pkg/file"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestGetDefaultCNINetwork(t *testing.T) {
    	tempDir := t.TempDir()
    
    	cases := []struct {
    		name            string
    		dir             string
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed May 17 02:22:22 GMT 2023
    - 15.4K bytes
    - Viewed (0)
  7. tests/test_tuples.py

        assert response.json() == data
    
    
    def test_tuple_with_model_invalid():
        data = [{"x": 1, "y": 2}, {"x": 3, "y": 4}, {"x": 5, "y": 6}]
        response = client.post("/tuple-of-models/", json=data)
        assert response.status_code == 422, response.text
    
        data = [{"x": 1, "y": 2}]
        response = client.post("/tuple-of-models/", json=data)
        assert response.status_code == 422, response.text
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  8. src/archive/zip/zip_test.go

    		},
    	}
    
    	// write a zip file
    	buf := new(bytes.Buffer)
    	w := NewWriter(buf)
    
    	for _, test := range headerTests {
    		h := &FileHeader{
    			Name:  test.name,
    			Extra: test.extra,
    		}
    		_, err := w.CreateHeader(h)
    		if err != test.wanterr {
    			t.Errorf("error=%v, want %v", err, test.wanterr)
    		}
    	}
    
    	if err := w.Close(); err != nil {
    		t.Fatal(err)
    	}
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  9. internal/hash/reader_test.go

    			if err != nil {
    				t.Fatalf("Test %q: Initializing reader failed %s", testCase.desc, err)
    			}
    			_, err = io.Copy(io.Discard, r)
    			if err != nil {
    				if testCase.err == nil {
    					t.Errorf("Test %q; got unexpected error: %v", testCase.desc, err)
    					return
    				}
    				if err.Error() != testCase.err.Error() {
    					t.Errorf("Test %q: Expected error %s, got error %s", testCase.desc, testCase.err, err)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.3K bytes
    - Viewed (0)
  10. cmd/utils_test.go

    		{[]string{"abcd/foo/bar/", "abcd/foo/bar/zoo"}, "abcd/foo/bar/"},
    	}
    
    	for i, test := range testCases {
    		foundPrefix := lcp(test.prefixes, true)
    		if foundPrefix != test.commonPrefix {
    			t.Fatalf("Test %d: Common prefix found: `%v`, expected: `%v`", i+1, foundPrefix, test.commonPrefix)
    		}
    	}
    }
    
    func TestGetMinioMode(t *testing.T) {
    	testMinioMode := func(expected string) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Feb 23 21:28:14 GMT 2024
    - 10.2K bytes
    - Viewed (0)
Back to top