Skip to content

Commit

Permalink
unit test fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
FusRoman committed Feb 20, 2024
1 parent 37c2c9d commit 6bd5108
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
9 changes: 6 additions & 3 deletions conf/fink.conf.dev
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ FINK_TRIGGER_UPDATE=2

# Alert schema
# Full path to schema to decode the alerts
FINK_ALERT_SCHEMA=${FINK_HOME}/fink-alert-schemas/ztf/template_schema_ZTF_3p3.avro
FINK_ALERT_SCHEMA=${FINK_SCHEMA}/ztf/template_schema_ZTF_3p3.avro

# Prefix path on disk to save live data.
# They can be in local FS (/path/ or files:///path/) or
# in distributed FS (e.g. hdfs:///path/).
# Be careful though to have enough disk space!
FS_KIND=local
ONLINE_DATA_PREFIX=${FINK_HOME}/online
AGG_DATA_PREFIX=${FINK_HOME}/archive
ONLINE_DATA_PREFIX=${FINK_HOME}/online_test
AGG_DATA_PREFIX=${FINK_HOME}/archive_test

# The name of the HBase table
SCIENCE_DB_NAME="test_portal"
Expand All @@ -94,6 +94,9 @@ DEPLOY_FINK_PYTHON=false
# Path to fink-fat output
FINK_FAT_OUTPUT=${FINK_HOME}/datasim/fink_fat_example

# Path to fink-mm configuration file
FINK_MM_CONFIG=${FINK_HOME}/conf/fink_mm.conf

######################################
# Slack
# OAuth Access Token for Slack Workspace
Expand Down
2 changes: 1 addition & 1 deletion fink_broker/avroUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def readschemafromavrofile(fn: str) -> dict:
globs = globals()
alert_schema_path = os.environ["FINK_SCHEMA"]
globs["ztf_alert_sample"] = os.path.join(
alert_schema_path, "fink-alert-schemas/ztf/template_schema_ZTF_3p3.avro"
alert_schema_path, "ztf/template_schema_ZTF_3p3.avro"
)

# Run the regular test suite
Expand Down
5 changes: 4 additions & 1 deletion fink_broker/sparkUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,14 @@ def list_hdfs_files(hdfs_path='archive/science/year=2023/month=06/day=25'):

globs = globals()
root = os.environ['FINK_HOME']
alert_schema_path = os.environ["FINK_SCHEMA"]

globs["ztf_alert_sample"] = os.path.join(
root, "online/raw/20200101")

globs["ztf_avro_sample"] = os.path.join(
root, "fink-alert-schemas/ztf/template_schema_ZTF_3p3.avro")
alert_schema_path, "ztf/template_schema_ZTF_3p3.avro"
)

# Run the Spark test suite
spark_unit_tests(globs, withstreaming=True)

0 comments on commit 6bd5108

Please sign in to comment.