Skip to content

Commit

Permalink
update 0004_start_test.py - remove quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
Defenso-QTH committed Nov 17, 2024
1 parent eea8fe0 commit bb2ddcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/functional_tests/0004_start_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def test_03_create_and_start_nobridge_vnet_jail(release, jail, invoke_cli, nobri

invoke_cli([

Check failure on line 65 in tests/functional_tests/0004_start_test.py

View check run for this annotation

Cirrus CI / Use prebuilt packages

tests/functional_tests/0004_start_test.py#L65

tests.functional_tests.0004_start_test.test_03_create_and_start_nobridge_vnet_jail
Raw output
release = '14.1-RELEASE', jail = nobridge_jail
invoke_cli = <function invoke_cli.<locals>.invoke at 0xf67646f0c20>
nobridge_jail_ip = '192.168.2.2'

    @require_root
    @require_zpool
    @require_nobridge_jail_ip
    def test_03_create_and_start_nobridge_vnet_jail(release, jail, invoke_cli, nobridge_jail_ip):
        jail = jail('nobridge_jail')
    
>       invoke_cli([
            'create', '-r', release, '-n', jail.name,
            f'ip4_addr=lo0|{nobridge_jail_ip}', 'boot=on', 'vnet=on',
            'interfaces=vnet0:none', 'vnet_default_interface=none',
            'ip6_addr=epair0b|fe80::2/10', 'defaultrouter6=fe80::1%epair0b',
            'defaultrouter=none'
        ])

tests/functional_tests/0004_start_test.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cmd = ['iocage', 'create', '-r', '14.1-RELEASE', '-n', 'nobridge_jail', ...]
reason = '  + Configuring VNET FAILED\n  route: fe80::1%epair0b: Name does not resolve\n\nStopped nobridge_jail due to VNET failure\n'
assert_returncode = True

    def invoke(cmd, reason=None, assert_returncode=True):
        cmd.insert(0, 'iocage')
        cmd = [str(c) for c in cmd]
    
        result = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE
        )
        reason = f'{reason}: {result.stderr}' if reason else result.stderr
    
        if assert_returncode:
            # Empty or Template jails that should not be started/stopped but
            # sometimes make it in due to a race
            try:
                reason = reason.decode()
            except AttributeError:
                pass
    
            if 'execvp: /bin/sh: No such' not in reason:
>               assert result.returncode == 0, reason
E               AssertionError:   + Configuring VNET FAILED
E                   route: fe80::1%epair0b: Name does not resolve
E                 
E                 Stopped nobridge_jail due to VNET failure
E                 
E               assert 1 == 0
E                +  where 1 = CompletedProcess(args=['iocage', 'create', '-r', '14.1-RELEASE', '-n', 'nobridge_jail', 'ip4_addr=lo0|192.168.2.2', 'boot=on', 'vnet=on', 'interfaces=vnet0:none', 'vnet_default_interface=none', 'ip6_addr=epair0b|fe80::2/10', 'defaultrouter6=fe80::1%epair0b', 'defaultrouter=none'], returncode=1, stdout=b'nobridge_jail successfully created!\n* Starting nobridge_jail\n  + Started OK\n  + Using devfs_ruleset: 1012 (iocage generated default)\n', stderr=b'  + Configuring VNET FAILED\n  route: fe80::1%epair0b: Name does not resolve\n\nStopped nobridge_jail due to VNET failure\n').returncode

tests/conftest.py:293: AssertionError
'create', '-r', release, '-n', jail.name,
f'ip4_addr="lo0|{nobridge_jail_ip}"', 'boot=on', 'vnet=on',
f'ip4_addr=lo0|{nobridge_jail_ip}', 'boot=on', 'vnet=on',
'interfaces=vnet0:none', 'vnet_default_interface=none',
'ip6_addr="epair0b|fe80::2/10', 'defaultrouter6=fe80::1%epair0b',
'ip6_addr=epair0b|fe80::2/10', 'defaultrouter6=fe80::1%epair0b',
'defaultrouter=none'
])

Expand Down

0 comments on commit bb2ddcf

Please sign in to comment.