Skip to content

Change downloadcommunitysnapshot argument #454

Change downloadcommunitysnapshot argument

Change downloadcommunitysnapshot argument #454

GitHub Actions / Test Results failed Oct 16, 2024 in 0s

3 fail, 6 skipped, 45 pass in 7s

54 tests  ±0   45 ✔️ ±0   7s ⏱️ ±0s
  1 suites ±0     6 💤 ±0 
  1 files   ±0     3 ±0 

Results for commit 00b1546. ± Comparison against earlier commit 0eae410.

Annotations

Check warning on line 0 in tests.unit.test_systemd.SystemdUnitTests

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_systemd_setup_default_config (tests.unit.test_systemd.SystemdUnitTests) failed

node-runner-cli/junit/test-results.xml [took 0s]
Raw output
AssertionError: '# WA[226 chars]org\n\nnetwork.id=1\n\nnode.key.path=/home/rad[498 chars]ress' != '# WA[226 chars]org\ndownload_community_snapshot=true\nnetwork[530 chars]ress'
  # WARNING!! This file is automatically generated and it is
  # overriden when on install/update commands.
  # Please consider re-running config/install commands rather
  # than manually edit this file
  
  ntp=false
  ntp.pool=pool.ntp.org
- 
+ download_community_snapshot=true
  network.id=1
  
  node.key.path=/home/radixdlt/babylon-node-config/node-keystore.ks
  node.key.create_if_missing=true
  
  network.p2p.broadcast_port=30000
  network.p2p.listen_port=30001
  network.p2p.seed_nodes=someNode
  network.p2p.use_proxy_protocol=false
  network.host_ip=1.1.1.1
  
  log.level=debug
  
  api.port=3333
  api.transactions.enable=true
  api.sign.enable=true
  api.bind.address=0.0.0.0
  
  api.system.port=3334
  api.system.bind_address=0.0.0.0
  
  db.location=/home/radixdlt/babylon-ledger
  
  consensus.validator_address=validatorAddress
self = <tests.unit.test_systemd.SystemdUnitTests testMethod=test_systemd_setup_default_config>
mockout = <_io.StringIO object at 0x7f72db477e20>

        @patch("sys.stdout", new_callable=StringIO)
        def test_systemd_setup_default_config(self, mockout):
            with patch("builtins.input", side_effect=[]):
                config = SystemDConfig({})
                config.common_config.host_ip = "1.1.1.1"
                config.common_config.network_id = 1
                config.core_node.keydetails.keyfile_path = (
                    "/home/radixdlt/babylon-node-config"
                )
                config.core_node.keydetails.keyfile_name = "node-keystore.ks"
                config.core_node.trusted_node = "someNode"
                config.core_node.validator_address = "validatorAddress"
                config.core_node.node_dir = "/tmp"
                config.migration.use_olympia = False
                config.create_default_config_file("")
            self.assertTrue(os.path.isfile("/tmp/default.config"))
    
            f = open("/tmp/default.config", "r")
            default_config = f.read()
            fixture = """# WARNING!! This file is automatically generated and it is
    # overriden when on install/update commands.
    # Please consider re-running config/install commands rather
    # than manually edit this file
    
    ntp=false
    ntp.pool=pool.ntp.org
    
    network.id=1
    
    node.key.path=/home/radixdlt/babylon-node-config/node-keystore.ks
    node.key.create_if_missing=true
    
    network.p2p.broadcast_port=30000
    network.p2p.listen_port=30001
    network.p2p.seed_nodes=someNode
    network.p2p.use_proxy_protocol=false
    network.host_ip=1.1.1.1
    
    log.level=debug
    
    api.port=3333
    api.transactions.enable=true
    api.sign.enable=true
    api.bind.address=0.0.0.0
    
    api.system.port=3334
    api.system.bind_address=0.0.0.0
    
    db.location=/home/radixdlt/babylon-ledger
    
    consensus.validator_address=validatorAddress"""
            self.maxDiff = None
            print(fixture)
>           self.assertEqual(fixture.strip(), default_config.strip())
E           AssertionError: '# WA[226 chars]org\n\nnetwork.id=1\n\nnode.key.path=/home/rad[498 chars]ress' != '# WA[226 chars]org\ndownload_community_snapshot=true\nnetwork[530 chars]ress'
E             # WARNING!! This file is automatically generated and it is
E             # overriden when on install/update commands.
E             # Please consider re-running config/install commands rather
E             # than manually edit this file
E             
E             ntp=false
E             ntp.pool=pool.ntp.org
E           - 
E           + download_community_snapshot=true
E             network.id=1
E             
E             node.key.path=/home/radixdlt/babylon-node-config/node-keystore.ks
E             node.key.create_if_missing=true
E             
E             network.p2p.broadcast_port=30000
E             network.p2p.listen_port=30001
E             network.p2p.seed_nodes=someNode
E             network.p2p.use_proxy_protocol=false
E             network.host_ip=1.1.1.1
E             
E             log.level=debug
E             
E             api.port=3333
E             api.transactions.enable=true
E             api.sign.enable=true
E             api.bind.address=0.0.0.0
E             
E             api.system.port=3334
E             api.system.bind_address=0.0.0.0
E             
E             db.location=/home/radixdlt/babylon-ledger
E             
E             consensus.validator_address=validatorAddress

tests/unit/test_systemd.py:212: AssertionError

Check warning on line 0 in tests.unit.test_systemd.SystemdUnitTests

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_systemd_setup_default_config_jinja (tests.unit.test_systemd.SystemdUnitTests) failed

node-runner-cli/junit/test-results.xml [took 0s]
Raw output
AssertionError: '# WA[226 chars]org\n\nnetwork.id=1\n\nnode.key.path=/home/rad[498 chars]ress' != '# WA[226 chars]org\ndownload_community_snapshot=true\nnetwork[530 chars]ress'
  # WARNING!! This file is automatically generated and it is
  # overriden when on install/update commands.
  # Please consider re-running config/install commands rather
  # than manually edit this file
  
  ntp=false
  ntp.pool=pool.ntp.org
- 
+ download_community_snapshot=true
  network.id=1
  
  node.key.path=/home/radixdlt/babylon-node-config/node-keystore.ks
  node.key.create_if_missing=true
  
  network.p2p.broadcast_port=30000
  network.p2p.listen_port=30001
  network.p2p.seed_nodes=someNode
  network.p2p.use_proxy_protocol=false
  network.host_ip=1.1.1.1
  
  log.level=debug
  
  api.port=3333
  api.transactions.enable=true
  api.sign.enable=true
  api.bind.address=0.0.0.0
  
  api.system.port=3334
  api.system.bind_address=0.0.0.0
  
  db.location=/home/radixdlt/babylon-ledger
  
  consensus.validator_address=validatorAddress
self = <tests.unit.test_systemd.SystemdUnitTests testMethod=test_systemd_setup_default_config_jinja>
mockout = <_io.StringIO object at 0x7f72db55a290>

        @patch("sys.stdout", new_callable=StringIO)
        def test_systemd_setup_default_config_jinja(self, mockout):
            with patch("builtins.input", side_effect=[]):
                settings = SystemDConfig({})
                settings.common_config.genesis_bin_data_file = None
                settings.core_node.keydetails.keyfile_path = (
                    "/home/radixdlt/babylon-node-config"
                )
                settings.core_node.keydetails.keyfile_name = "node-keystore.ks"
                settings.core_node.trusted_node = "someNode"
                settings.common_config.host_ip = "1.1.1.1"
                settings.common_config.network_id = 1
                settings.core_node.validator_address = "validatorAddress"
                settings.migration.use_olympia = False
                render_template = (
                    Renderer()
                    .load_file_based_template("systemd-default.config.j2")
                    .render(settings.to_dict())
                    .rendered
                )
            fixture = """# WARNING!! This file is automatically generated and it is
    # overriden when on install/update commands.
    # Please consider re-running config/install commands rather
    # than manually edit this file
    
    ntp=false
    ntp.pool=pool.ntp.org
    
    network.id=1
    
    node.key.path=/home/radixdlt/babylon-node-config/node-keystore.ks
    node.key.create_if_missing=true
    
    network.p2p.broadcast_port=30000
    network.p2p.listen_port=30001
    network.p2p.seed_nodes=someNode
    network.p2p.use_proxy_protocol=false
    network.host_ip=1.1.1.1
    
    log.level=debug
    
    api.port=3333
    api.transactions.enable=true
    api.sign.enable=true
    api.bind.address=0.0.0.0
    
    api.system.port=3334
    api.system.bind_address=0.0.0.0
    
    db.location=/home/radixdlt/babylon-ledger
    
    consensus.validator_address=validatorAddress
    
    """
            self.maxDiff = None
>           self.assertEqual(fixture.strip(), render_template.strip())
E           AssertionError: '# WA[226 chars]org\n\nnetwork.id=1\n\nnode.key.path=/home/rad[498 chars]ress' != '# WA[226 chars]org\ndownload_community_snapshot=true\nnetwork[530 chars]ress'
E             # WARNING!! This file is automatically generated and it is
E             # overriden when on install/update commands.
E             # Please consider re-running config/install commands rather
E             # than manually edit this file
E             
E             ntp=false
E             ntp.pool=pool.ntp.org
E           - 
E           + download_community_snapshot=true
E             network.id=1
E             
E             node.key.path=/home/radixdlt/babylon-node-config/node-keystore.ks
E             node.key.create_if_missing=true
E             
E             network.p2p.broadcast_port=30000
E             network.p2p.listen_port=30001
E             network.p2p.seed_nodes=someNode
E             network.p2p.use_proxy_protocol=false
E             network.host_ip=1.1.1.1
E             
E             log.level=debug
E             
E             api.port=3333
E             api.transactions.enable=true
E             api.sign.enable=true
E             api.bind.address=0.0.0.0
E             
E             api.system.port=3334
E             api.system.bind_address=0.0.0.0
E             
E             db.location=/home/radixdlt/babylon-ledger
E             
E             consensus.validator_address=validatorAddress

tests/unit/test_systemd.py:321: AssertionError

Check warning on line 0 in tests.unit.test_systemd.SystemdUnitTests

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_systemd_setup_default_config_without_validator (tests.unit.test_systemd.SystemdUnitTests) failed

node-runner-cli/junit/test-results.xml [took 0s]
Raw output
AssertionError: '# WA[226 chars]org\ndownload_community_snapshot=true\nnetwork[482 chars]dger' != '# WA[226 chars]org\n\nnetwork.id=1\n\nnode.key.path=/home/rad[450 chars]dger'
  # WARNING!! This file is automatically generated and it is
  # overriden when on install/update commands.
  # Please consider re-running config/install commands rather
  # than manually edit this file
  
  ntp=false
  ntp.pool=pool.ntp.org
- download_community_snapshot=true
+ 
  network.id=1
  
  node.key.path=/home/radixdlt/babylon-node-config/node-keystore.ks
  node.key.create_if_missing=true
  
  network.p2p.broadcast_port=30000
  network.p2p.listen_port=30001
  network.p2p.seed_nodes=someNode
  network.p2p.use_proxy_protocol=false
  network.host_ip=1.1.1.1
  
  log.level=debug
  
  api.port=3333
  api.transactions.enable=true
  api.sign.enable=true
  api.bind.address=0.0.0.0
  
  api.system.port=3334
  api.system.bind_address=0.0.0.0
  
  db.location=/home/radixdlt/babylon-ledger
self = <tests.unit.test_systemd.SystemdUnitTests testMethod=test_systemd_setup_default_config_without_validator>
mockout = <_io.StringIO object at 0x7f72db55a5f0>

        @patch("sys.stdout", new_callable=StringIO)
        def test_systemd_setup_default_config_without_validator(self, mockout):
            with patch("builtins.input", side_effect=[]):
                settings = SystemDConfig({})
                settings.common_config.host_ip = "1.1.1.1"
                settings.common_config.network_id = 1
                settings.core_node.keydetails.keyfile_path = (
                    "/home/radixdlt/babylon-node-config"
                )
                settings.core_node.keydetails.keyfile_name = "node-keystore.ks"
                settings.core_node.trusted_node = "someNode"
                settings.core_node.validator_address = None
                settings.core_node.node_dir = "/tmp"
                settings.create_default_config_file("")
            self.assertTrue(os.path.isfile("/tmp/default.config"))
    
            f = open("/tmp/default.config", "r")
            default_config = f.read()
            fixture = """ # WARNING!! This file is automatically generated and it is
    # overriden when on install/update commands.
    # Please consider re-running config/install commands rather
    # than manually edit this file
    
    ntp=false
    ntp.pool=pool.ntp.org
    
    network.id=1
    
    node.key.path=/home/radixdlt/babylon-node-config/node-keystore.ks
    node.key.create_if_missing=true
    
    network.p2p.broadcast_port=30000
    network.p2p.listen_port=30001
    network.p2p.seed_nodes=someNode
    network.p2p.use_proxy_protocol=false
    network.host_ip=1.1.1.1
    
    log.level=debug
    
    api.port=3333
    api.transactions.enable=true
    api.sign.enable=true
    api.bind.address=0.0.0.0
    
    api.system.port=3334
    api.system.bind_address=0.0.0.0
    
    db.location=/home/radixdlt/babylon-ledger
    """
            self.maxDiff = None
>           self.assertEqual(default_config.strip(), fixture.strip())
E           AssertionError: '# WA[226 chars]org\ndownload_community_snapshot=true\nnetwork[482 chars]dger' != '# WA[226 chars]org\n\nnetwork.id=1\n\nnode.key.path=/home/rad[450 chars]dger'
E             # WARNING!! This file is automatically generated and it is
E             # overriden when on install/update commands.
E             # Please consider re-running config/install commands rather
E             # than manually edit this file
E             
E             ntp=false
E             ntp.pool=pool.ntp.org
E           - download_community_snapshot=true
E           + 
E             network.id=1
E             
E             node.key.path=/home/radixdlt/babylon-node-config/node-keystore.ks
E             node.key.create_if_missing=true
E             
E             network.p2p.broadcast_port=30000
E             network.p2p.listen_port=30001
E             network.p2p.seed_nodes=someNode
E             network.p2p.use_proxy_protocol=false
E             network.host_ip=1.1.1.1
E             
E             log.level=debug
E             
E             api.port=3333
E             api.transactions.enable=true
E             api.sign.enable=true
E             api.bind.address=0.0.0.0
E             
E             api.system.port=3334
E             api.system.bind_address=0.0.0.0
E             
E             db.location=/home/radixdlt/babylon-ledger

tests/unit/test_systemd.py:264: AssertionError