test/commands/test_node.rb in zold-0.11.5 vs test/commands/test_node.rb in zold-0.11.6
- old
+ new
@@ -36,22 +36,22 @@
# Author:: Yegor Bugayenko (yegor256@gmail.com)
# Copyright:: Copyright (c) 2018 Yegor Bugayenko
# License:: MIT
class TestNode < Minitest::Test
def test_push_and_fetch
- FakeNode.new(log: log).run do |port|
+ FakeNode.new(log: test_log).run do |port|
Dir.mktmpdir 'test' do |dir|
id = Zold::Id.new
wallets = Zold::Wallets.new(dir)
wallet = wallets.find(id)
wallet.init(id, Zold::Key.new(file: 'fixtures/id_rsa.pub'))
remotes = Zold::Remotes.new(File.join(dir, 'remotes.csv'))
remotes.clean
remotes.add('localhost', port)
- Zold::Push.new(wallets: wallets, remotes: remotes, log: log).run(['push', '--sync'])
+ Zold::Push.new(wallets: wallets, remotes: remotes, log: test_log).run(['push', '--sync'])
Zold::Fetch.new(
wallets: wallets, copies: File.join(dir, 'copies'),
- remotes: remotes, log: log
+ remotes: remotes, log: test_log
).run(['fetch'])
copies = Zold::Copies.new(File.join(dir, "copies/#{id}"))
assert_equal(1, copies.all.count)
assert_equal('1', copies.all[0][:name])
assert_equal(0, copies.all[0][:score])