Skip to content

Commit

Permalink
fix links in tests for the new location
Browse files Browse the repository at this point in the history
  • Loading branch information
jaegeral committed Sep 20, 2024
1 parent d9cfeb1 commit b25d4fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion end_to_end_tests/upload_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def test_datetime_out_of_normal_range_in_csv(self):
name=f"datetime_out_of_normal_range_in_csv_{rand}"
)
self.sketch = sketch
file_path = "/usr/local/src/timesketch/test_tools/test_events/validate_time_out_of_range.csv" # pylint: disable=line-too-long
file_path = "/usr/local/src/timesketch/tests/test_events/validate_time_out_of_range.csv" # pylint: disable=line-too-long
self.import_timeline(file_path, index_name=rand, sketch=sketch)
timeline = sketch.list_timelines()[0]
# check that timeline was uploaded correctly
Expand Down
2 changes: 1 addition & 1 deletion timesketch/lib/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class TestConfig(object):
SIMILARITY_DATA_TYPES = []
SIGMA_RULES_FOLDERS = ["./data/sigma/rules/"]
INTELLIGENCE_TAG_METADATA = "./data/intelligence_tag_metadata.yaml"
CONTEXT_LINKS_CONFIG_PATH = "./test_tools/test_events/mock_context_links.yaml"
CONTEXT_LINKS_CONFIG_PATH = "./tests/test_events/mock_context_links.yaml"
LLM_PROVIDER = "test"
DFIQ_ENABLED = False
DATA_TYPES_PATH = "./test_data/nl2q/test_data_types.csv"
Expand Down
18 changes: 6 additions & 12 deletions timesketch/lib/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def test_missing_timestamp_csv_file(self):
self.assertDictEqual(
next(
read_and_validate_csv(
"test_tools/test_events/validate_date_events_missing_timestamp.csv"
"tests/test_events/validate_date_events_missing_timestamp.csv"
)
),
expected_output,
Expand Down Expand Up @@ -225,9 +225,7 @@ def test_timestamp_is_ISOformat(self):
},
]
results = iter(
read_and_validate_csv(
"test_tools/test_events/validate_timestamp_conversion.csv"
)
read_and_validate_csv("tests/test_events/validate_timestamp_conversion.csv")
)
for output in expected_outputs:
self.assertDictEqual(next(results), output)
Expand All @@ -237,7 +235,7 @@ def test_missing_datetime_in_CSV(self):
to get it from timestamp or fail"""
results = iter(
read_and_validate_csv(
"test_tools/test_events/validate_no_datetime_timestamps.csv"
"tests/test_events/validate_no_datetime_timestamps.csv"
)
)

Expand Down Expand Up @@ -281,9 +279,7 @@ def test_time_datetime_valueerror(self):
"""

results = iter(
read_and_validate_csv("test_tools/test_events/invalid_datetime.csv")
)
results = iter(read_and_validate_csv("tests/test_events/invalid_datetime.csv"))
results_list = []
for item in results:
results_list.append(item)
Expand All @@ -303,9 +299,7 @@ def test_datetime_out_of_normal_range_in_csv(self):
https://github.com/google/timesketch/issues/1617
"""
results = iter(
read_and_validate_csv(
"test_tools/test_events/validate_time_out_of_range.csv"
)
read_and_validate_csv("tests/test_events/validate_time_out_of_range.csv")
)
results_list = []
for item in results:
Expand All @@ -319,7 +313,7 @@ def test_datetime_out_of_normal_range_in_csv(self):
def test_time_precision_in_csv(self):
"""Test for parsing a file with time precision"""
results = iter(
read_and_validate_csv("test_tools/test_events/validate_time_precision.csv")
read_and_validate_csv("tests/test_events/validate_time_precision.csv")
)
results_list = []
for item in results:
Expand Down

0 comments on commit b25d4fe

Please sign in to comment.