chore: use testcontainers-go module for couchbase in tests

This commit is contained in:
Manuel de la Peña
2024-08-21 16:51:57 +02:00
parent f35a941b18
commit 2c3433f532
5 changed files with 256 additions and 48 deletions
+2 -7
View File
@@ -21,16 +21,11 @@ jobs:
steps:
- name: Fetch Repository
uses: actions/checkout@v4
- name: Install couchbase
run: |
docker run --name couchbase -d -p 8091-8097:8091-8097 -p 9123:9123 -p 11207:11207 -p 11210:11210 -p 11280:11280 -p 18091-18097:18091-18097 couchbase:enterprise-7.1.1
sleep 10
docker exec --tty couchbase couchbase-cli cluster-init -c localhost:8091 --cluster-username admin --cluster-password 123456 --cluster-ramsize 256 --services data
sleep 10
docker exec --tty couchbase couchbase-cli bucket-create -c localhost:8091 --username admin --password 123456 --bucket fiber_storage --bucket-type couchbase --bucket-ramsize 100 --enable-flush 1
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '${{ matrix.go-version }}'
- name: Run Test
env:
TEST_COUCHBASE_IMAGE: couchbase:enterprise-7.1.1
run: cd ./couchbase && go test ./... -v -race