Skip to content

Commit

Permalink
Speed up local testing: don't regenerate certs
Browse files Browse the repository at this point in the history
  • Loading branch information
ods committed Oct 21, 2023
1 parent 00349a8 commit ee20b37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SCALA_VERSION?=2.12
KAFKA_VERSION?=1.1.1
SCALA_VERSION?=2.13
KAFKA_VERSION?=2.8.1
IMAGE_NAME?=aiolibs/kafka
IMAGE_TAG=$(IMAGE_NAME):$(SCALA_VERSION)_$(KAFKA_VERSION)

Expand Down
7 changes: 4 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import uuid
import sys
import pathlib
import shutil

from aiokafka.record.legacy_records import (
LegacyRecordBatchBuilder, _LegacyRecordBatchBuilderPy)
Expand Down Expand Up @@ -117,8 +116,10 @@ def kafka_image():
@pytest.fixture(scope='session')
def ssl_folder(docker_ip_address, docker, kafka_image):
ssl_dir = pathlib.Path('tests/ssl_cert')
if ssl_dir.exists():
shutil.rmtree(str(ssl_dir))
if ssl_dir.is_dir():
# Skip generating certificates when they already exist. Remove
# directory to re-generate them.
return ssl_dir

ssl_dir.mkdir()

Expand Down

0 comments on commit ee20b37

Please sign in to comment.