Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBG-4085: Add default collection and non-xattr test CI jobs #6975

Merged
merged 2 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading