Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 3,977 for test1 (0.13 sec)

  1. cmd/encryption-v1_test.go

    }
    
    func TestDecryptObjectInfo(t *testing.T) {
    	for i, test := range decryptObjectMetaTests {
    		if encrypted, err := DecryptObjectInfo(&test.info, test.request); err != test.expErr {
    			t.Errorf("Test %d: Decryption returned wrong error code: got %d , want %d", i, err, test.expErr)
    		} else if _, enc := crypto.IsEncrypted(test.info.UserDefined); encrypted && enc != encrypted {
    			t.Errorf("Test %d: Decryption thinks object is encrypted but it is not", i)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Sep 24 04:17:08 GMT 2022
    - 19.9K bytes
    - Viewed (0)
  2. cmd/data-scanner_test.go

    			want:      lifecycle.DelMarkerDeleteAllVersionsAction,
    		},
    	}
    
    	for i, test := range tests {
    		t.Run(fmt.Sprintf("TestEvalAction-%d", i), func(t *testing.T) {
    			if got := evalActionFromLifecycle(context.TODO(), test.ilm, test.retention, nil, test.obj); got.Action != test.want {
    				t.Fatalf("Expected %v but got %v", test.want, got)
    			}
    		})
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 11:18:58 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  3. tests/postgres_test.go

    package tests_test
    
    import (
    	"testing"
    	"time"
    
    	"github.com/google/uuid"
    	"github.com/lib/pq"
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestPostgresReturningIDWhichHasStringType(t *testing.T) {
    	if DB.Dialector.Name() != "postgres" {
    		t.Skip()
    	}
    
    	type Yasuo struct {
    		ID        string `gorm:"default:gen_random_uuid()"`
    		Name      string
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Oct 08 09:16:32 GMT 2022
    - 6.4K bytes
    - Viewed (3)
  4. cmd/handler-utils_test.go

    	}
    	for i, test := range testCases {
    		gotResource, err := getResource(test.p, test.host, test.domains)
    		if err != nil {
    			t.Fatal(err)
    		}
    		if gotResource != test.expectedResource {
    			t.Fatalf("test %d: expected %s got %s", i+1, test.expectedResource, gotResource)
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  5. istioctl/pkg/writer/envoy/configdump/configdump_test.go

    // limitations under the License.
    
    package configdump
    
    import (
    	"bytes"
    	"os"
    	"testing"
    
    	"istio.io/istio/pilot/test/util"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestConfigWriter_Prime(t *testing.T) {
    	tests := []struct {
    		name        string
    		wantConfigs int
    		inputFile   string
    		wantErr     bool
    	}{
    		{
    			name:        "errors if unable to unmarshal bytes",
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Jan 03 23:08:06 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  6. istioctl/pkg/writer/pilot/status_test.go

    	"istio.io/istio/pilot/pkg/xds"
    	v3 "istio.io/istio/pilot/pkg/xds/v3"
    	"istio.io/istio/pkg/cluster"
    	"istio.io/istio/pkg/test/util/assert"
    	istioversion "istio.io/istio/pkg/version"
    	"istio.io/istio/tests/util"
    )
    
    func TestXdsStatusWriter_PrintAll(t *testing.T) {
    	tests := []struct {
    		name    string
    		input   map[string]*discovery.DiscoveryResponse
    		want    string
    		wantErr bool
    	}{
    		{
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  7. cmd/os-reliable_test.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"testing"
    )
    
    // Tests - mkdirAll()
    func TestOSMkdirAll(t *testing.T) {
    	// create xlStorage test setup
    	_, path, err := newXLStorageTestSetup(t)
    	if err != nil {
    		t.Fatalf("Unable to create xlStorage test setup, %s", err)
    	}
    
    	if err = mkdirAll("", 0o777, ""); err != errInvalidArgument {
    		t.Fatal("Unexpected error", err)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Sep 13 15:14:36 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  8. cmd/leak-detect_test.go

    		}
    		return
    	}
    }
    
    // DetectTestLeak -  snapshots the currently running goroutines and returns a
    // function to be run at the end of tests to see whether any
    // goroutines leaked.
    // Usage: `defer DetectTestLeak(t)()` in beginning line of benchmarks or unit tests.
    func DetectTestLeak(t TestErrHandler) func() {
    	initialStackSnapShot := NewLeakDetect()
    	return func() {
    		initialStackSnapShot.DetectLeak(t)
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  9. tests/benchmark_test.go

    package tests_test
    
    import (
    	"fmt"
    	"testing"
    
    	. "gorm.io/gorm/utils/tests"
    )
    
    func BenchmarkCreate(b *testing.B) {
    	user := *GetUser("bench", Config{})
    
    	for x := 0; x < b.N; x++ {
    		user.ID = 0
    		DB.Create(&user)
    	}
    }
    
    func BenchmarkFind(b *testing.B) {
    	user := *GetUser("find", Config{})
    	DB.Create(&user)
    
    	for x := 0; x < b.N; x++ {
    		DB.Find(&User{}, "id = ?", user.ID)
    	}
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Jun 01 03:50:57 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  10. cmd/net_test.go

    			t.Fatalf("Test %d: should succeed but failed with err: %v", i+1, err)
    		}
    		if testCase.expectedErr != nil && err == nil {
    			t.Fatalf("Test %d:, should fail but succeeded.", i+1)
    		}
    		if err == nil {
    			if host != testCase.host {
    				t.Fatalf("Test %d: expected: %v, found: %v", i+1, testCase.host, host)
    			}
    			if port != testCase.port {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 08:43:09 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top