Skip to content

Commit

Permalink
CBG-4085: Add default collection and non-xattr test CI jobs (#6975)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrks authored Jul 18, 2024
1 parent 0693411 commit 906cb04
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,45 @@ jobs:
uses: guyarb/[email protected]
with:
test-results: test.json

test-default-collection:
runs-on: ubuntu-latest
env:
GOPRIVATE: github.com/couchbaselabs
SG_TEST_USE_DEFAULT_COLLECTION: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.5
- name: Run Tests
run: go test -tags cb_sg_devmode -shuffle=on -timeout=30m -count=1 -json -v "./..." | tee test.json | jq -s -jr 'sort_by(.Package,.Time) | .[].Output | select (. != null )'
shell: bash
- name: Annotate Failures
if: always()
uses: guyarb/[email protected]
with:
test-results: test.json

test-no-xattrs:
runs-on: ubuntu-latest
env:
GOPRIVATE: github.com/couchbaselabs
SG_TEST_USE_XATTRS: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.5
- name: Run Tests
run: go test -tags cb_sg_devmode -shuffle=on -timeout=30m -count=1 -json -v "./..." | tee test.json | jq -s -jr 'sort_by(.Package,.Time) | .[].Output | select (. != null )'
shell: bash
- name: Annotate Failures
if: always()
uses: guyarb/[email protected]
with:
test-results: test.json

python-format:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 8 additions & 0 deletions db/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,10 @@ func TestMetadataOnlyUpdate(t *testing.T) {
}

func TestImportResurrectionMou(t *testing.T) {
if !base.TestUseXattrs() {
t.Skip("This test requires xattrs because it relies on import")
}

base.SetUpTestLogging(t, base.LevelInfo, base.KeyMigrate, base.KeyImport, base.KeyCRUD)
db, ctx := setupTestDBWithOptionsAndImport(t, nil, DatabaseContextOptions{})
defer db.Close(ctx)
Expand Down Expand Up @@ -951,6 +955,10 @@ func TestImportResurrectionMou(t *testing.T) {
// update, even though it originated with an SDK delete, because the existing non-winning revision body will be
// promoted to winning.
func TestImportConflictWithTombstone(t *testing.T) {
if !base.TestUseXattrs() {
t.Skip("This test requires xattrs because it relies on import")
}

base.SetUpTestLogging(t, base.LevelInfo, base.KeyMigrate, base.KeyImport, base.KeyCRUD)
db, ctx := setupTestDBWithOptionsAndImport(t, nil, DatabaseContextOptions{})
defer db.Close(ctx)
Expand Down
7 changes: 7 additions & 0 deletions rest/changes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ func TestWebhookWinningRevChangedEvent(t *testing.T) {
// - Update this doc again, triggering unused sequence range release
// - Write another doc and assert that the changes feed returns all expected docs
func TestJumpInSequencesAtAllocatorSkippedSequenceFill(t *testing.T) {
if !base.TestUseXattrs() {
t.Skip("This test requires xattrs because it writes directly to the xattr")
}

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

Expand Down Expand Up @@ -342,6 +345,10 @@ func TestJumpInSequencesAtAllocatorSkippedSequenceFill(t *testing.T) {
// - Update this doc again, triggering unused sequence range release
// - Write another doc and assert that the changes feed returns all expected docs
func TestJumpInSequencesAtAllocatorRangeInPending(t *testing.T) {
if !base.TestUseXattrs() {
t.Skip("This test requires xattrs because it writes directly to the xattr")
}

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

rt := NewRestTester(t, &RestTesterConfig{
Expand Down

0 comments on commit 906cb04

Please sign in to comment.