Skip to content

Commit

Permalink
add env variable for kafka url
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal committed Jun 29, 2022
1 parent d23996b commit 24df078
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions smoke-test/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
from tests.utils import (
get_frontend_url,
get_gms_url,
get_kafka_broker_url,
get_sleep_info,
ingest_file_via_rest,
)

KAFKA_BROKER = "localhost:9092"

bootstrap_sample_data = "../metadata-ingestion/examples/mce_files/bootstrap_mce.json"
usage_sample_data = (
"../metadata-ingestion/tests/integration/bigquery-usage/bigquery_usages_golden.json"
Expand Down Expand Up @@ -139,7 +138,7 @@ def test_ingestion_via_kafka(wait_for_healthchecks):
"type": "datahub-kafka",
"config": {
"connection": {
"bootstrap": KAFKA_BROKER,
"bootstrap": get_kafka_broker_url(),
}
},
},
Expand Down
4 changes: 4 additions & 0 deletions smoke-test/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ def get_frontend_url():
return os.getenv("DATAHUB_FRONTEND_URL") or "http://localhost:9002"


def get_kafka_broker_url():
return os.getenv("DATAHUB_KAFKA_URL") or "localhost:9092"


def get_sleep_info():
return (
os.environ.get("DATAHUB_TEST_SLEEP_BETWEEN") or 60,
Expand Down

0 comments on commit 24df078

Please sign in to comment.