(t *testing.T)
| 956 | } |
| 957 | |
| 958 | func TestValidateServerContextSharedBuckets(t *testing.T) { |
| 959 | base.RequireNumTestBuckets(t, 2) |
| 960 | |
| 961 | if base.UnitTestUrlIsWalrus() { |
| 962 | t.Skip("Skipping this test; requires Couchbase Bucket") |
| 963 | } |
| 964 | |
| 965 | base.SetUpTestLogging(t, base.LevelDebug, base.KeyAll) |
| 966 | ctx := base.TestCtx(t) |
| 967 | |
| 968 | tb1 := base.GetTestBucket(t) |
| 969 | defer tb1.Close(ctx) |
| 970 | |
| 971 | tb2 := base.GetTestBucket(t) |
| 972 | defer tb2.Close(ctx) |
| 973 | |
| 974 | tb1User, tb1Password, _ := tb1.BucketSpec.Auth.GetCredentials() |
| 975 | tb2User, tb2Password, _ := tb2.BucketSpec.Auth.GetCredentials() |
| 976 | |
| 977 | xattrs := base.TestUseXattrs() |
| 978 | config := &StartupConfig{ |
| 979 | Bootstrap: BootstrapConfig{ |
| 980 | UseTLSServer: base.Ptr(base.ServerIsTLS(base.UnitTestUrl())), |
| 981 | ServerTLSSkipVerify: base.Ptr(base.TestTLSSkipVerify()), |
| 982 | }, |
| 983 | } |
| 984 | databases := DbConfigMap{ |
| 985 | "db1": { |
| 986 | BucketConfig: BucketConfig{ |
| 987 | Server: &tb1.BucketSpec.Server, |
| 988 | Bucket: &tb1.BucketSpec.BucketName, |
| 989 | Username: tb1User, |
| 990 | Password: tb1Password, |
| 991 | }, |
| 992 | EnableXattrs: &xattrs, |
| 993 | UseViews: base.Ptr(base.TestsDisableGSI()), |
| 994 | }, |
| 995 | "db2": { |
| 996 | BucketConfig: BucketConfig{ |
| 997 | Server: &tb1.BucketSpec.Server, |
| 998 | Bucket: &tb1.BucketSpec.BucketName, |
| 999 | Username: tb1User, |
| 1000 | Password: tb1Password, |
| 1001 | }, |
| 1002 | EnableXattrs: &xattrs, |
| 1003 | UseViews: base.Ptr(base.TestsDisableGSI()), |
| 1004 | }, |
| 1005 | "db3": { |
| 1006 | BucketConfig: BucketConfig{ |
| 1007 | Server: &tb2.BucketSpec.Server, |
| 1008 | Bucket: &tb2.BucketSpec.BucketName, |
| 1009 | Username: tb2User, |
| 1010 | Password: tb2Password, |
| 1011 | }, |
| 1012 | EnableXattrs: &xattrs, |
| 1013 | UseViews: base.Ptr(base.TestsDisableGSI()), |
| 1014 | }, |
| 1015 | } |
nothing calls this directly
no test coverage detected