Skip to content

Commit

Permalink
Remove walrus restriction from tests that now work with rosmar (#6495)
Browse files Browse the repository at this point in the history
  • Loading branch information
torcolvin authored Oct 6, 2023
1 parent cf8c3a4 commit d183dbe
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 61 deletions.
12 changes: 0 additions & 12 deletions base/bucket_gocb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2301,10 +2301,6 @@ func TestInsertTombstoneWithXattr(t *testing.T) {
// - write as JSON, read as binary, (re-)write as binary
func TestRawBackwardCompatibilityFromJSON(t *testing.T) {

if UnitTestUrlIsWalrus() {
t.Skip("RawBackwardCompatibility tests depend on couchbase transcoding")
}

ctx := TestCtx(t)
bucket := GetTestBucket(t)
defer bucket.Close(ctx)
Expand Down Expand Up @@ -2341,10 +2337,6 @@ func TestRawBackwardCompatibilityFromJSON(t *testing.T) {
// - write as binary, read as raw JSON, rewrite as raw JSON
func TestRawBackwardCompatibilityFromBinary(t *testing.T) {

if UnitTestUrlIsWalrus() {
t.Skip("RawBackwardCompatibility tests depend on couchbase transcoding")
}

ctx := TestCtx(t)
bucket := GetTestBucket(t)
defer bucket.Close(ctx)
Expand Down Expand Up @@ -2379,10 +2371,6 @@ func TestRawBackwardCompatibilityFromBinary(t *testing.T) {

func TestGetExpiry(t *testing.T) {

if UnitTestUrlIsWalrus() {
t.Skip("Walrus doesn't support expiry")
}

ctx := TestCtx(t)
bucket := GetTestBucket(t)
defer bucket.Close(ctx)
Expand Down
6 changes: 0 additions & 6 deletions db/attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1160,12 +1160,6 @@ func TestMigrateBodyAttachmentsMerge(t *testing.T) {
// TestMigrateBodyAttachmentsMergeConflicting will set up a document with the same attachment name in both pre-2.5 and post-2.5 metadata, making sure that the metadata with the most recent revpos is chosen.
func TestMigrateBodyAttachmentsMergeConflicting(t *testing.T) {

if base.TestUseXattrs() && base.UnitTestUrlIsWalrus() {
t.Skip("Test requires Couchbase Server bucket when using xattrs")
}

base.SetUpTestLogging(t, base.LevelDebug, base.KeyAll)

const docKey = "TestAttachmentMigrate"

db, ctx := setupTestDB(t)
Expand Down
4 changes: 0 additions & 4 deletions db/change_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1001,10 +1001,6 @@ func TestLowSequenceHandlingWithAccessGrant(t *testing.T) {
// - since it's been terminated, should return error before executing a second view query
func TestChannelQueryCancellation(t *testing.T) {

if !base.UnitTestUrlIsWalrus() {
t.Skip("Skip test with LeakyBucket dependency test when running in integration")
}

base.SetUpTestLogging(t, base.LevelInfo, base.KeyCache)

// Set up PostQueryCallback on bucket - will be invoked when changes triggers the cache backfill view query
Expand Down
14 changes: 1 addition & 13 deletions db/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2463,13 +2463,6 @@ func TestRepairUnorderedRecentSequences(t *testing.T) {

func TestDeleteWithNoTombstoneCreationSupport(t *testing.T) {

// TODO: re-enable after adding ability to override bucket capabilities (CBG-1593)
t.Skip("GoCB bucket required for cluster compatibility override")

if base.UnitTestUrlIsWalrus() {
t.Skip("Requires gocb bucket")
}

if !base.TestUseXattrs() {
t.Skip("Xattrs required")
}
Expand All @@ -2478,11 +2471,6 @@ func TestDeleteWithNoTombstoneCreationSupport(t *testing.T) {
defer db.Close(ctx)
collection := GetSingleDatabaseCollectionWithUser(t, db)

// gocbBucket, _ := base.AsGoCBBucket(db.Bucket)

// Set something lower than version required for CreateAsDeleted subdoc flag
// gocbBucket.OverrideClusterCompatVersion(5, 5)

// Ensure empty doc is imported correctly
added, err := collection.dataStore.Add("doc1", 0, map[string]interface{}{})
assert.NoError(t, err)
Expand Down Expand Up @@ -2859,7 +2847,7 @@ func Test_resyncDocument(t *testing.T) {
for _, testCase := range testCases {
t.Run(fmt.Sprintf("Test_resyncDocument with useXattr: %t", testCase.useXattr), func(t *testing.T) {
if !base.TestUseXattrs() && testCase.useXattr {
t.Skip("Walrus doesn't support xattr")
t.Skip("Don't run xattr tests on non xattr tests")
}
db, ctx := setupTestDB(t)
defer db.Close(ctx)
Expand Down
6 changes: 0 additions & 6 deletions db/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,6 @@ func TestCoveringQueries(t *testing.T) {

func TestAllDocsQuery(t *testing.T) {

// if base.TestsDisableGSI() {
// t.Skip("This test is Couchbase Server and UseViews=false only")
// }

base.SetUpTestLogging(t, base.LevelTrace, base.KeyWalrus)

db, ctx := setupTestDB(t)
defer db.Close(ctx)
collection := GetSingleDatabaseCollectionWithUser(t, db)
Expand Down
14 changes: 0 additions & 14 deletions rest/adminapitest/admin_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,6 @@ func TestGetStatus(t *testing.T) {

func TestFlush(t *testing.T) {

if !base.UnitTestUrlIsWalrus() {
t.Skip("sgbucket.DeleteableBucket inteface only supported by Walrus")
}

rt := rest.NewRestTester(t, nil)
defer rt.Close()

Expand Down Expand Up @@ -2443,9 +2439,6 @@ func TestHandleCreateDB(t *testing.T) {
}

func TestHandleCreateDBJsonName(t *testing.T) {
if base.UnitTestUrlIsWalrus() {
t.Skip("This test only works against Couchbase Server")
}
testCases := []struct {
name string
JSONname string
Expand Down Expand Up @@ -2759,13 +2752,6 @@ func TestConfigRedaction(t *testing.T) {
}

func TestSoftDeleteCasMismatch(t *testing.T) {
// FIXME: LeakyBucket not supported for metadata collection
t.Skip("LeakyBucket not supported for metadata collection")

if !base.UnitTestUrlIsWalrus() {
t.Skip("Skip LeakyBucket test when running in integration")
}

rt := rest.NewRestTester(t, nil)
defer rt.Close()

Expand Down
3 changes: 0 additions & 3 deletions rest/revocation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1231,9 +1231,6 @@ func TestRevocationsWithQueryLimitChangesLimit(t *testing.T) {
}

func TestRevocationUserHasDocAccessDocNotFound(t *testing.T) {
if !base.UnitTestUrlIsWalrus() {
t.Skip("Skip test with LeakyBucket dependency when running in integration")
}

revocationTester, rt := InitScenario(t, &RestTesterConfig{
DatabaseConfig: &DatabaseConfig{DbConfig: DbConfig{
Expand Down
3 changes: 0 additions & 3 deletions rest/user_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1341,9 +1341,6 @@ func TestUserXattrRevCache(t *testing.T) {

func TestUserXattrDeleteWithRevCache(t *testing.T) {
base.SetUpTestLogging(t, base.LevelDebug, base.KeyAll)
if base.UnitTestUrlIsWalrus() {
t.Skip("This test only works against Couchbase Server")
}

if !base.TestUseXattrs() {
t.Skip("This test only works with XATTRS enabled")
Expand Down

0 comments on commit d183dbe

Please sign in to comment.