ING-1088: Add testing for durability error cases #8
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 Tests | |
| permissions: | |
| contents: read | |
| packages: read | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Data API Durability Impossible Test | |
| strategy: | |
| matrix: | |
| server: | |
| - 8.0.0-3534 | |
| - 7.6.5 | |
| - 7.2.2 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: ./.github/actions/install-cbdinocluster | |
| - 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/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/protoc-gen-go@v1.36 | |
| go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5 | |
| go install github.com/matryer/moq@v0.5 | |
| - name: Install Dependencies | |
| run: go get ./... | |
| - name: Generate Files | |
| run: | | |
| go generate ./... | |
| - name: Run Test | |
| env: | |
| SGTEST_CBCONNSTR: ${{ env.CBDC_IP }} | |
| SGTEST_DINOID: ${{ env.CBDC_ID }} | |
| run: go test ./gateway/test -run TestGatewayOps -v -testify.m TestDapiDurabilityImpossible | |
| - name: Collect couchbase logs | |
| timeout-minutes: 10 | |
| if: failure() | |
| run: | | |
| mkdir -p ./dapi-durability-impossible | |
| cbdinocluster -v collect-logs $CBDC_ID ./dapi-durability-impossible-logs | |
| - name: Upload couchbase logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cbcollect-logs-${{ matrix.server }} | |
| path: ./dapi-durability-impossible/* | |
| retention-days: 5 |