Skip to content

Fix reducer unit test #338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openc3/lib/openc3/microservices/reducer_microservice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def process_file(filename, type, entry_nanoseconds, file_nanoseconds)
file = BucketFile.new(filename)
file.retrieve
unless file.local_path
@logger.warning("Reducer Warning: #{filename}: Could not be retrieved")
@logger.warn("Reducer Warning: #{filename}: Could not be retrieved")
return
end

Expand Down
3 changes: 3 additions & 0 deletions openc3/spec/microservices/reducer_microservice_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,17 @@ module OpenC3
FileUtils.move filename, log_file
if log_file.include?("decom")
@decom_files << log_file
@decom_files << log_file # Push twice because two calls to :local_path in source
# Add the file to the ReducerModel like we would in the real system
ReducerModel.add_file(bucket_path)
elsif log_file.include?("minute")
@minute_files << log_file
@minute_files << log_file # Push twice because two calls to :local_path in source
# Add the file to the ReducerModel like we would in the real system
ReducerModel.add_file(bucket_path)
elsif log_file.include?("hour")
@hour_files << log_file
@hour_files << log_file # Push twice because two calls to :local_path in source
# Add the file to the ReducerModel like we would in the real system
ReducerModel.add_file(bucket_path)
elsif log_file.include?("day")
Expand Down