Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 275 for testis (0.15 sec)

  1. internal/s3select/sql/value_test.go

    		return FromString("")
    	},
    }
    
    func TestValue_SameTypeAs(t *testing.T) {
    	type fields struct {
    		a, b Value
    	}
    	type test struct {
    		name   string
    		fields fields
    		wantOk bool
    	}
    	var tests []test
    	for i := range valueBuilders {
    		a := valueBuilders[i]()
    		for j := range valueBuilders {
    			b := valueBuilders[j]()
    			tests = append(tests, test{
    				name: fmt.Sprint(a.GetTypeString(), "==", b.GetTypeString()),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 12.5K bytes
    - Viewed (0)
  2. cmd/erasure_test.go

    		}
    
    		if err == nil && test.shouldFail {
    			t.Errorf("Test %d: test should fail but it passed", i)
    		}
    		if err != nil && !test.shouldFail {
    			t.Errorf("Test %d: test should pass but it failed: %v", i, err)
    		}
    
    		decoded := encoded
    		if !test.shouldFail {
    			if test.reconstructParity {
    				for j := range decoded {
    					if decoded[j] == nil {
    						t.Errorf("Test %d: failed to reconstruct shard %d", i, j)
    					}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jul 25 19:37:26 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  3. cmd/erasure-sets_test.go

    		b.Run("", func(b *testing.B) {
    			b.SetBytes(1024)
    			b.ReportAllocs()
    			b.ResetTimer()
    			for i := 0; i < b.N; i++ {
    				sipHashMod(key, 16, testUUID)
    			}
    		})
    	}
    }
    
    // TestSipHashMod - test sip hash.
    func TestSipHashMod(t *testing.T) {
    	testCases := []struct {
    		objectName string
    		sipHash    int
    	}{
    		// cases which should pass the test.
    		// passing in valid object name.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 12 07:21:56 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  4. internal/mountinfo/mountinfo_linux_test.go

    package mountinfo
    
    import (
    	"fmt"
    	"os"
    	"path/filepath"
    	"strings"
    	"testing"
    )
    
    // Tests cross device mount verification function, for both failure
    // and success cases.
    func TestCrossDeviceMountPaths(t *testing.T) {
    	successCase := `/dev/0 /path/to/0/1 type0 flags 0 0
    		/dev/1    /path/to/1   type1	flags 1 1
    		/dev/2 /path/to/1/2 type2 flags,1,2=3 2 2
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  5. cmd/data-usage-cache_test.go

    				"BETWEEN_1024B_AND_1_MB":   2,
    				"BETWEEN_10_MB_AND_64_MB":  1,
    			},
    		},
    	}
    	for i, test := range tests {
    		t.Run(fmt.Sprintf("Test-%d", i), func(t *testing.T) {
    			var h sizeHistogram
    			for _, sz := range test.sizes {
    				h.add(sz)
    			}
    			got := h.toMap()
    			exp := test.want
    			// what is in exp is in got
    			for k := range exp {
    				if exp[k] != got[k] {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Jan 13 07:51:08 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  6. cmd/bucket-lifecycle_test.go

    		if err != nil {
    			t.Fatalf("Test %d: parse restore object failed: %v", i+1, err)
    		}
    		if actual.ongoing != tc.ongoing || actual.expiry.Format(http.TimeFormat) != tc.expiry.Format(http.TimeFormat) {
    			t.Fatalf("Test %d: got %v expected %v", i+1, actual, tc)
    		}
    	}
    }
    
    // TestRestoreObjOnDisk tests restoreObjStatus' OnDisk method
    func TestRestoreObjOnDisk(t *testing.T) {
    	testCases := []struct {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue May 31 09:57:57 GMT 2022
    - 7K bytes
    - Viewed (0)
  7. internal/bpool/bpool_test.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package bpool
    
    import "testing"
    
    // Tests - bytePool functionality.
    func TestBytePool(t *testing.T) {
    	size := uint64(4)
    	width := 1024
    	capWidth := 2048
    
    	bufPool := NewBytePoolCap(size, width, capWidth)
    
    	// Check the width
    	if bufPool.Width() != width {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 19:13:27 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  8. cmd/jwt_test.go

    	claims.SetAccessKey(accessKey)
    	token := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, claims)
    	return token.SignedString([]byte(secretKey))
    }
    
    // Tests web request authenticator.
    func TestWebRequestAuthenticate(t *testing.T) {
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    
    	obj, fsDir, err := prepareFS(ctx)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.RemoveAll(fsDir)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:45:14 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  9. internal/grid/benchmark_test.go

    				}
    			})
    		}
    	})
    }
    
    func BenchmarkStream(b *testing.B) {
    	tests := []struct {
    		name string
    		fn   func(b *testing.B, n int)
    	}{
    		{name: "request", fn: benchmarkGridStreamReqOnly},
    		{name: "responses", fn: benchmarkGridStreamRespOnly},
    	}
    	for _, test := range tests {
    		b.Run(test.name, func(b *testing.B) {
    			for n := 2; n <= 32; n *= 2 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 12.2K bytes
    - Viewed (0)
  10. internal/grid/grid_types_test.go

    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package grid
    
    //go:generate msgp -unexported -file=$GOFILE -tests=false -o=grid_types_msgp_test.go
    
    type testRequest struct {
    	Num    int
    	String string
    }
    
    type testResponse struct {
    	OrgNum    int
    	OrgString string
    	Embedded  testRequest
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 1.1K bytes
    - Viewed (0)
Back to top