Skip to content

Commit

Permalink
Fix logfile name in failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
billdueber committed Jul 24, 2023
1 parent 5f88d97 commit c914a18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/cictl/index_command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Make a fake delete entry for a bogus id
bogus_delete = "000000000"
CICTL::SolrClient.new.set_deleted [bogus_delete]
CICTL::Commands.start(["index", "all", "--no-wait", "--log", test_log])
CICTL::Commands.start(["index", "all", "--no-wait", "--quiet", "--log", test_log])
expect(solr_count).to eq CICTL::Examples.all_ids.count + 1
expect(solr_deleted_count).to be > 0
expect(solr_ids("deleted:true")).to include(bogus_delete)
Expand Down
3 changes: 2 additions & 1 deletion spec/cictl/logger_factory_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require "spec_helper"
require_relative "../../lib/cictl/logfile_defaults"
require_relative "../../lib/services"

RSpec.describe CICTL::LoggerFactory do
def testlogger(verbose: false, log_file: test_log, quiet: false)
Expand All @@ -24,7 +25,7 @@ def testlogger(verbose: false, log_file: test_log, quiet: false)

it "sends stuff to the logfile" do
testlogger.error "error-in-file"
expect(File.read(testlog_path)).to match(/error-in-file/)
expect(File.read(HathiTrust::Services[:logfile_directory] + "/" + test_log)).to match(/error-in-file/)
end

it "does not send anything less than #error to STDERR" do
Expand Down

0 comments on commit c914a18

Please sign in to comment.