test/commands/test_node.rb in zold-0.31.8 vs test/commands/test_node.rb in zold-0.31.9
- old
+ new
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-# Copyright (c) 2018-2023 Zerocracy
+# Copyright (c) 2018-2024 Zerocracy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -34,28 +34,28 @@
require_relative '../../lib/zold/commands/push'
require_relative '../node/fake_node'
# NODE test.
# Author:: Yegor Bugayenko (yegor256@gmail.com)
-# Copyright:: Copyright (c) 2018 Yegor Bugayenko
+# Copyright:: Copyright (c) 2018-2024 Zerocracy
# License:: MIT
class TestNode < Zold::Test
def test_push_and_fetch
- FakeHome.new(log: test_log).run do |home|
- FakeNode.new(log: test_log).run do |port|
+ FakeHome.new(log: fake_log).run do |home|
+ FakeNode.new(log: fake_log).run do |port|
wallets = home.wallets
wallet = home.create_wallet
remotes = home.remotes
remotes.add('localhost', port)
- Zold::Push.new(wallets: wallets, remotes: remotes, log: test_log).run(
+ Zold::Push.new(wallets: wallets, remotes: remotes, log: fake_log).run(
['push', '--ignore-score-weakness', '--tolerate-edges', '--tolerate-quorum=1']
)
copies = home.copies(wallet)
begin
retries ||= 0
Zold::Fetch.new(
wallets: wallets, copies: copies.root,
- remotes: remotes, log: test_log
+ remotes: remotes, log: fake_log
).run(['fetch', '--ignore-score-weakness', '--tolerate-edges', '--tolerate-quorum=1'])
rescue StandardError => _e
sleep 1
retry if (retries += 1) < 3
end