ING-1088: Add testing for durability error cases #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run Isolated Tests | |
| permissions: | |
| contents: read | |
| packages: read | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Integration Test | |
| strategy: | |
| matrix: | |
| server: | |
| - 8.0.0-3534 | |
| - 7.6.5 | |
| - 7.2.2 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install cbdinocluster | |
| run: | | |
| mkdir -p "$HOME/bin" | |
| wget -nv -O $HOME/bin/cbdinocluster https://github.com/couchbaselabs/cbdinocluster/releases/download/v0.0.84/cbdinocluster-linux-amd64 | |
| chmod +x $HOME/bin/cbdinocluster | |
| echo "$HOME/bin" >> $GITHUB_PATH | |
| - name: Initialize cbdinocluster | |
| run: | | |
| cbdinocluster -v init --auto | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Start couchbase cluster | |
| env: | |
| CLUSTERCONFIG: | | |
| nodes: | |
| - count: 3 | |
| version: ${{ matrix.server }} | |
| services: [kv, n1ql, index, fts, cbas] | |
| docker: | |
| kv-memory: 2048 | |
| index-memory: 1024 | |
| fts-memory: 1024 | |
| run: | | |
| CBDC_ID=$(cbdinocluster -v alloc --def="${CLUSTERCONFIG}") | |
| cbdinocluster -v buckets add ${CBDC_ID} default --ram-quota-mb=100 --flush-enabled=true --num-replicas=2 | |
| cbdinocluster -v collections add ${CBDC_ID} default _default test | |
| CBDC_IP=$(cbdinocluster -v ip $CBDC_ID) | |
| echo "CBDC_ID=$CBDC_ID" >> "$GITHUB_ENV" | |
| echo "CBDC_IP=$CBDC_IP" >> "$GITHUB_ENV" | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24 | |
| - uses: arduino/setup-protoc@v3 | |
| with: | |
| version: 31.1 | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Tools | |
| run: | | |
| go install google.golang.org/protobuf/cmd/[email protected] | |
| go install google.golang.org/grpc/cmd/[email protected] | |
| go install github.com/matryer/[email protected] | |
| - name: Install Dependencies | |
| run: go get ./... | |
| - name: Generate Files | |
| run: | | |
| go generate ./... | |
| - name: Run SyncWriteAmbiguous Tests | |
| env: | |
| SGTEST_CBCONNSTR: ${{ env.CBDC_IP }} | |
| SGTEST_DINOID: ${{ env.CBDC_ID }} | |
| run: go test -tags syncWriteAmbiguous ./gateway/test -run TestGatewayOps -v -testify.m TestSyncWriteAmbiguous | |
| - name: Run DurabilityImpossible Tests | |
| env: | |
| SGTEST_CBCONNSTR: ${{ env.CBDC_IP }} | |
| SGTEST_DINOID: ${{ env.CBDC_ID }} | |
| run: go test -tags durabilityImpossible ./gateway/test -run TestGatewayOps -v -testify.m TestDurabilityImpossible | |
| - name: Collect couchbase logs | |
| timeout-minutes: 10 | |
| if: failure() | |
| run: | | |
| mkdir -p ./isolated-logs | |
| cbdinocluster -v collect-logs $CBDC_ID ./isolated-logs | |
| - name: Upload couchbase logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cbcollect-logs-${{ matrix.server }} | |
| path: ./isolated-logs/* | |
| retention-days: 5 |