Skip to content

Commit 19f3acf

Browse files
authored
fix(test/ci): Resurrect couchbase test (#361)
This PR reinstates the testing of the couchbase instrumentation.
1 parent 0d4e636 commit 19f3acf

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.circleci/config.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ commands:
4646
steps:
4747
- run:
4848
name: Install Couchbase Dependencies
49+
# Even if we use focal, we need to add the bionic repo
50+
# See: https://forums.couchbase.com/
51+
# t/installing-libcouchbase-dev-on-ubuntu-20-focal-fossa/25955/3
4952
command: |
50-
sudo apt-get update
51-
sudo apt install lsb-release -y
52-
curl -O https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-6-amd64.deb
53-
sudo dpkg -i ./couchbase-release-1.0-6-amd64.deb
54-
sudo apt-get update
53+
sudo apt update
54+
sudo wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
55+
echo "deb http://packages.couchbase.com/ubuntu bionic bionic/main" | sudo tee /etc/apt/sources.list.d/couchbase.list
56+
sudo apt update
5557
sudo apt install libcouchbase-dev -y
5658
5759
jobs:
@@ -358,4 +360,5 @@ workflows:
358360
- py36cassandra
359361
- py37asynqp
360362
- py37asynqp-legacy
363+
- py38couchbase
361364
- gevent38

tests/clients/test_couchbase.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from __future__ import absolute_import
55

6+
import os
67
import time
78
import pytest
89
import unittest
@@ -37,7 +38,7 @@ def setup_class(self):
3738
self.bucket = Bucket('couchbase://%s/travel-sample' % testenv['couchdb_host'],
3839
username=testenv['couchdb_username'], password=testenv['couchdb_password'])
3940

40-
def setup_method(self):
41+
def setup_method(self, _):
4142
self.bucket.upsert('test-key', 1)
4243
time.sleep(0.5)
4344
self.recorder.clear_spans()

tests/requirements-couchbase.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
couchbase==2.5.9
1+
couchbase==2.5.9
2+
pytest>=4.6

0 commit comments

Comments
 (0)