Skip to content

Commit

Permalink
Added back tests for etcd2
Browse files Browse the repository at this point in the history
  • Loading branch information
tcalmant committed Aug 23, 2024
1 parent 6656175 commit 6b31c0a
Showing 4 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -6,3 +6,4 @@ zeroconf==0.19.1
osgiservicebridge>=1.5.7
pyyaml>=6.0
etcd3>=0.12.0
python-etcd==0.4.5
8 changes: 6 additions & 2 deletions tests-infra/etcd/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
services:
etcd:
etcd3:
image: bitnami/etcd
environment:
- ALLOW_NONE_AUTHENTICATION=yes
ports:
- "2379:2379"
- "2380:2380"

etcd2:
build: etcd2
ports:
- "12379:12379"
8 changes: 8 additions & 0 deletions tests-infra/etcd/etcd2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM debian

WORKDIR /opt/
RUN apt update && apt install -y curl && apt clean
RUN curl -L https://github.com/coreos/etcd/releases/download/v2.3.7/etcd-v2.3.7-linux-amd64.tar.gz | tar xzvf -
WORKDIR /opt/etcd-v2.3.7-linux-amd64

ENTRYPOINT [ "/opt/etcd-v2.3.7-linux-amd64/etcd", "--advertise-client-urls", "http://127.0.0.1:12379", "--listen-client-urls", "http://0.0.0.0:12379" ]
4 changes: 4 additions & 0 deletions tests/rsa/test_etcd_discovery.py
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@
from tests.utilities import WrappedProcess

TEST_ETCD_HOSTNAME = "localhost"
TEST_ETCD_PORT = 12379
TEST_ETCD_TOPPATH = "/etcddiscovery.tests"

ENDPOINT_LISTENER_SCOPE = f"({ECF_ENDPOINT_CONTAINERID_NAMESPACE}=*)"
@@ -85,6 +86,7 @@ def start_framework_for_advertise(state_queue):
{
"ecf.xmlrpc.server.hostname": "localhost",
"etcd.hostname": TEST_ETCD_HOSTNAME,
"etcd.port": TEST_ETCD_PORT,
"etcd.toppath": TEST_ETCD_TOPPATH,
},
)
@@ -160,6 +162,7 @@ def setUp(self):
],
{
"etcd.hostname": TEST_ETCD_HOSTNAME,
"etcd.port": TEST_ETCD_PORT,
"etcd.toppath": TEST_ETCD_TOPPATH,
},
)
@@ -275,6 +278,7 @@ def setUp(self):
{
"ecf.xmlrpc.server.hostname": "localhost",
"etcd.hostname": TEST_ETCD_HOSTNAME,
"etcd.port": TEST_ETCD_PORT,
"etcd.toppath": TEST_ETCD_TOPPATH,
},
)

0 comments on commit 6b31c0a

Please sign in to comment.