Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 975 for testSave (0.21 sec)

  1. internal/event/targetidset_test.go

    	}
    
    	for i, testCase := range testCases {
    		result := testCase.set.Clone()
    
    		if !reflect.DeepEqual(result, testCase.set) {
    			t.Fatalf("test %v: result: expected: %v, got: %v", i+1, testCase.set, result)
    		}
    
    		result.add(testCase.targetIDToAdd)
    		if reflect.DeepEqual(result, testCase.set) {
    			t.Fatalf("test %v: result: expected: not equal, got: equal", i+1)
    		}
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.9K bytes
    - Viewed (0)
  2. internal/event/arn_test.go

    	}
    
    	for i, testCase := range testCases {
    		arn := &ARN{}
    		err := xml.Unmarshal(testCase.data, &arn)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    
    		if !testCase.expectErr {
    			if *arn != *testCase.expectedARN {
    				t.Fatalf("test %v: data: expected: %v, got: %v", i+1, testCase.expectedARN, arn)
    			}
    		}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  3. internal/config/etcd/etcd_test.go

    		{"http://localhost:2379", []string{"http://localhost:2379"}, false, true},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run(testCase.s, func(t *testing.T) {
    			endpoints, secure, err := parseEndpoints(testCase.s)
    			if err != nil && testCase.success {
    				t.Errorf("expected to succeed but failed with %s", err)
    			}
    			if !testCase.success && err == nil {
    				t.Error("expected failure but succeeded instead")
    			}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 2.1K bytes
    - Viewed (0)
  4. internal/event/rules_test.go

    		{rulesCase8, NewPattern("", "*.jpg"), TargetID{"1", "webhook"}, 2},
    	}
    
    	for i, testCase := range testCases {
    		testCase.rules.Add(testCase.pattern, testCase.targetID)
    		result := len(testCase.rules)
    
    		if result != testCase.expectedResult {
    			t.Fatalf("test %v: result: expected: %v, got: %v", i+1, testCase.expectedResult, result)
    		}
    	}
    }
    
    func TestRulesMatch(t *testing.T) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 8.8K bytes
    - Viewed (0)
  5. cmd/common-main_test.go

    			"Hello, Gophers",
    		},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			tmpfile, err := os.CreateTemp("", "testfile")
    			if err != nil {
    				t.Error(err)
    			}
    			tmpfile.WriteString(testCase.content)
    			tmpfile.Sync()
    			tmpfile.Close()
    
    			value, err := readFromSecret(tmpfile.Name())
    			if err != nil && !testCase.expectedErr {
    				t.Error(err)
    			}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  6. internal/config/compress/compress_test.go

    		{"text/*,application/json", []string{"text/*", "application/json"}, true},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run(testCase.str, func(t *testing.T) {
    			gotPatterns, err := parseCompressIncludes(testCase.str)
    			if !testCase.success && err == nil {
    				t.Error("expected failure but success instead")
    			}
    			if testCase.success && err != nil {
    				t.Errorf("expected success but failed instead %s", err)
    			}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.8K bytes
    - Viewed (0)
  7. cmd/signature-v4_test.go

    				"Policy": []string{"policy"},
    			},
    			expected: ErrNone,
    		},
    	}
    
    	// Run each test case individually.
    	for i, testCase := range testCases {
    		_, code := doesPolicySignatureMatch(testCase.form)
    		if code != testCase.expected {
    			t.Errorf("(%d) expected to get %s, instead got %s", i, niceError(testCase.expected), niceError(code))
    		}
    	}
    }
    
    func TestDoesPresignedSignatureMatch(t *testing.T) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 10.4K bytes
    - Viewed (1)
  8. cmd/utils_test.go

    		},
    	}
    
    	// Validate all test cases.
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			bucketName, objectName := path2BucketObject(testCase.path)
    			if bucketName != testCase.bucket {
    				t.Errorf("failed expected bucket name \"%s\", got \"%s\"", testCase.bucket, bucketName)
    			}
    			if objectName != testCase.object {
    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)
  9. src/test/java/org/codelibs/core/io/ClassTraversalTest.java

    import static org.junit.Assert.assertTrue;
    
    import java.io.File;
    import java.net.JarURLConnection;
    import java.net.URL;
    import java.util.zip.ZipInputStream;
    
    import junit.framework.TestCase;
    
    import org.codelibs.core.jar.JarFileUtil;
    import org.codelibs.core.lang.ClassUtil;
    import org.junit.Before;
    import org.junit.Test;
    
    /**
     * @author taedium
     */
    public class ClassTraversalTest {
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  10. cmd/api-resources_test.go

    		}
    		if startAfter != testCase.startAfter {
    			t.Errorf("Test %d: Expected %s, got %s", i+1, testCase.startAfter, startAfter)
    		}
    		if delimiter != testCase.delimiter {
    			t.Errorf("Test %d: Expected %s, got %s", i+1, testCase.delimiter, delimiter)
    		}
    		if fetchOwner != testCase.fetchOwner {
    			t.Errorf("Test %d: Expected %t, got %t", i+1, testCase.fetchOwner, fetchOwner)
    		}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 7.1K bytes
    - Viewed (0)
Back to top