Skip to content

Commit

Permalink
Fixing sha-extractor BDD tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Drobena committed Feb 15, 2024
1 parent 870ac48 commit 2ad275f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions features/SHA_Extractor/sha_extractor.feature
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,4 @@ Feature: SHA Extractor
And SHA extractor should download tarball from given URL attribute
When the file "config/workload_info.json" is found
Then the content of this file needs to be sent into topic "archive_results"
When compression is disabled
Then Published message should not be compressed
And Published message should not be compressed
3 changes: 1 addition & 2 deletions features/SHA_Extractor/sha_extractor_compressed.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@ Feature: SHA Extractor
And SHA extractor should download tarball from given URL attribute
When the file "config/workload_info.json" is found
Then the content of this file needs to be sent into topic "archive_results"
When compression is enabled
Then Published message have to be compressed
And Published message have to be compressed
6 changes: 2 additions & 4 deletions features/steps/insights_sha_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,9 @@ def start_sha_extractor_compressed(context, group_id=None):
context.sha_extractor = sha_extractor


@when("compression is enabled")
@then("Published message have to be compressed")
def compressed_archive_sent_to_topic(context):
"""Check that sha extractor did not process any event."""
"""Check that sha extractor publish compressed messages to outgoing topic."""
decoded = None
error = None
message = kafka_util.consume_message_from_topic(context.kafka_hostname, context.outgoing_topic)
Expand All @@ -251,10 +250,9 @@ def compressed_archive_sent_to_topic(context):
assert decoded is not None and error is None


@when("compression is disabled")
@then("Published message should not be compressed")
def no_compressed_archive_sent_to_topic(context):
"""Check that sha extractor did not process any event."""
"""Check that sha extractor does not publish compressed messages to topic."""
decoded = None
error = None
message = kafka_util.consume_message_from_topic(context.kafka_hostname, context.outgoing_topic)
Expand Down

0 comments on commit 2ad275f

Please sign in to comment.