Commit 2e22c931 authored by Thomas Haller's avatar Thomas Haller

clients/tests: test creating and activating VPN connection

parent eceaba02
......@@ -152,4 +152,29 @@ clients_tests_expected_files = \
clients/tests/test-client.check-on-disk/test_004-007.expected \
clients/tests/test-client.check-on-disk/test_004-008.expected \
clients/tests/test-client.check-on-disk/test_004-009.expected \
clients/tests/test-client.check-on-disk/test_004-010.expected \
clients/tests/test-client.check-on-disk/test_004-011.expected \
clients/tests/test-client.check-on-disk/test_004-012.expected \
clients/tests/test-client.check-on-disk/test_004-013.expected \
clients/tests/test-client.check-on-disk/test_004-014.expected \
clients/tests/test-client.check-on-disk/test_004-015.expected \
clients/tests/test-client.check-on-disk/test_004-016.expected \
clients/tests/test-client.check-on-disk/test_004-017.expected \
clients/tests/test-client.check-on-disk/test_004-018.expected \
clients/tests/test-client.check-on-disk/test_004-019.expected \
clients/tests/test-client.check-on-disk/test_004-020.expected \
clients/tests/test-client.check-on-disk/test_004-021.expected \
clients/tests/test-client.check-on-disk/test_004-022.expected \
clients/tests/test-client.check-on-disk/test_004-023.expected \
clients/tests/test-client.check-on-disk/test_004-024.expected \
clients/tests/test-client.check-on-disk/test_004-025.expected \
clients/tests/test-client.check-on-disk/test_004-026.expected \
clients/tests/test-client.check-on-disk/test_004-027.expected \
clients/tests/test-client.check-on-disk/test_004-028.expected \
clients/tests/test-client.check-on-disk/test_004-029.expected \
clients/tests/test-client.check-on-disk/test_004-030.expected \
clients/tests/test-client.check-on-disk/test_004-031.expected \
clients/tests/test-client.check-on-disk/test_004-032.expected \
clients/tests/test-client.check-on-disk/test_004-033.expected \
clients/tests/test-client.check-on-disk/test_004-034.expected \
$(NULL)
location: clients/tests/test-client.py:830:test_004()/10
cmd: $NMCLI connection add type vpn con-name con-vpn-1 ifname '*' vpn-type openvpn vpn.data 'key1 = val1, key2 = val2, key3=val3'
lang: C
returncode: 0
stdout: 82 bytes
>>>
Connection 'con-vpn-1' (UUID-con-vpn-1-REPLACED-REPLACED-REP) successfully added.
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:833:test_004()/11
cmd: $NMCLI con s
lang: C
returncode: 0
stdout: 268 bytes
>>>
NAME UUID TYPE DEVICE
con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet --
con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP vpn --
con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA wifi --
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:833:test_004()/12
cmd: $NMCLI con s
lang: pl_PL.UTF-8
returncode: 0
stdout: 268 bytes
>>>
NAME UUID TYPE DEVICE
con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet --
con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP vpn --
con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA wifi --
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:835:test_004()/13
cmd: $NMCLI con s con-vpn-1
lang: C
returncode: 0
stdout: 3231 bytes
>>>
connection.id: con-vpn-1
connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP
connection.stable-id: --
connection.type: vpn
connection.interface-name: --
connection.autoconnect: yes
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.auth-retries: -1
connection.timestamp: 0
connection.read-only: no
connection.permissions: --
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: unknown
connection.lldp: default
connection.mdns: -1 (default)
ipv4.method: auto
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: ""
ipv4.dns-priority: 0
ipv4.addresses: --
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-timeout: 0 (default)
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.never-default: no
ipv4.may-fail: yes
ipv4.dad-timeout: -1 (default)
ipv6.method: auto
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: ""
ipv6.dns-priority: 0
ipv6.addresses: --
ipv6.gateway: --
ipv6.routes: --
ipv6.route-metric: -1
ipv6.route-table: 0 (unspec)
ipv6.ignore-auto-routes: no
ipv6.ignore-auto-dns: no
ipv6.never-default: no
ipv6.may-fail: yes
ipv6.ip6-privacy: -1 (unknown)
ipv6.addr-gen-mode: stable-privacy
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: --
ipv6.token: --
vpn.service-type: org.freedesktop.NetworkManager.openvpn
vpn.user-name: --
vpn.data: key1 = val1, key2 = val2, key3 = val3
vpn.secrets: <hidden>
vpn.persistent: no
vpn.timeout: 0
proxy.method: none
proxy.browser-only: no
proxy.pac-url: --
proxy.pac-script: --
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:835:test_004()/14
cmd: $NMCLI con s con-vpn-1
lang: pl_PL.UTF-8
returncode: 0
stdout: 3241 bytes
>>>
connection.id: con-vpn-1
connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP
connection.stable-id: --
connection.type: vpn
connection.interface-name: --
connection.autoconnect: tak
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.auth-retries: -1
connection.timestamp: 0
connection.read-only: nie
connection.permissions: --
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: nieznane
connection.lldp: default
connection.mdns: -1 (default)
ipv4.method: auto
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: ""
ipv4.dns-priority: 0
ipv4.addresses: --
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
ipv4.ignore-auto-routes: nie
ipv4.ignore-auto-dns: nie
ipv4.dhcp-client-id: --
ipv4.dhcp-timeout: 0 (default)
ipv4.dhcp-send-hostname: tak
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.never-default: nie
ipv4.may-fail: tak
ipv4.dad-timeout: -1 (default)
ipv6.method: auto
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: ""
ipv6.dns-priority: 0
ipv6.addresses: --
ipv6.gateway: --
ipv6.routes: --
ipv6.route-metric: -1
ipv6.route-table: 0 (unspec)
ipv6.ignore-auto-routes: nie
ipv6.ignore-auto-dns: nie
ipv6.never-default: nie
ipv6.may-fail: tak
ipv6.ip6-privacy: -1 (unknown)
ipv6.addr-gen-mode: stable-privacy
ipv6.dhcp-send-hostname: tak
ipv6.dhcp-hostname: --
ipv6.token: --
vpn.service-type: org.freedesktop.NetworkManager.openvpn
vpn.user-name: --
vpn.data: key1 = val1, key2 = val2, key3 = val3
vpn.secrets: <hidden>
vpn.persistent: nie
vpn.timeout: 0
proxy.method: none
proxy.browser-only: nie
proxy.pac-url: --
proxy.pac-script: --
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:837:test_004()/15
cmd: $NMCLI con up con-xx1
lang: C
returncode: 0
stdout: 106 bytes
>>>
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:839:test_004()/16
cmd: $NMCLI con s
lang: C
returncode: 0
stdout: 268 bytes
>>>
NAME UUID TYPE DEVICE
con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA wifi wlan0
con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet --
con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP vpn --
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:839:test_004()/17
cmd: $NMCLI con s
lang: pl_PL.UTF-8
returncode: 0
stdout: 268 bytes
>>>
NAME UUID TYPE DEVICE
con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA wifi wlan0
con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet --
con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP vpn --
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:841:test_004()/18
cmd: $NMCLI con up con-vpn-1
lang: C
returncode: 0
stdout: 106 bytes
>>>
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2)
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:843:test_004()/19
cmd: $NMCLI con s
lang: C
returncode: 0
stdout: 268 bytes
>>>
NAME UUID TYPE DEVICE
con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP vpn wlan0
con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA wifi wlan0
con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet --
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:843:test_004()/20
cmd: $NMCLI con s
lang: pl_PL.UTF-8
returncode: 0
stdout: 268 bytes
>>>
NAME UUID TYPE DEVICE
con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP vpn wlan0
con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA wifi wlan0
con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet --
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:845:test_004()/21
cmd: $NMCLI con s con-vpn-1
lang: C
returncode: 0
stdout: 4283 bytes
>>>
connection.id: con-vpn-1
connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP
connection.stable-id: --
connection.type: vpn
connection.interface-name: --
connection.autoconnect: yes
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.auth-retries: -1
connection.timestamp: 0
connection.read-only: no
connection.permissions: --
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: unknown
connection.lldp: default
connection.mdns: -1 (default)
ipv4.method: auto
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: ""
ipv4.dns-priority: 0
ipv4.addresses: --
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-timeout: 0 (default)
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.never-default: no
ipv4.may-fail: yes
ipv4.dad-timeout: -1 (default)
ipv6.method: auto
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: ""
ipv6.dns-priority: 0
ipv6.addresses: --
ipv6.gateway: --
ipv6.routes: --
ipv6.route-metric: -1
ipv6.route-table: 0 (unspec)
ipv6.ignore-auto-routes: no
ipv6.ignore-auto-dns: no
ipv6.never-default: no
ipv6.may-fail: yes
ipv6.ip6-privacy: -1 (unknown)
ipv6.addr-gen-mode: stable-privacy
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: --
ipv6.token: --
vpn.service-type: org.freedesktop.NetworkManager.openvpn
vpn.user-name: --
vpn.data: key1 = val1, key2 = val2, key3 = val3
vpn.secrets: <hidden>
vpn.persistent: no
vpn.timeout: 0
proxy.method: none
proxy.browser-only: no
proxy.pac-url: --
proxy.pac-script: --
GENERAL.NAME: con-vpn-1
GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP
GENERAL.DEVICES: wlan0
GENERAL.STATE: activated
GENERAL.DEFAULT: no
GENERAL.DEFAULT6: no
GENERAL.SPEC-OBJECT: --
GENERAL.VPN: yes
GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3
GENERAL.ZONE: --
GENERAL.MASTER-PATH: --
VPN.TYPE: openvpn
VPN.USERNAME: --
VPN.GATEWAY: --
VPN.BANNER: --
VPN.VPN-STATE: 0 - unknown
VPN.CFG[1]: key1 = val1
VPN.CFG[2]: key2 = val2
VPN.CFG[3]: key3 = val3
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:845:test_004()/22
cmd: $NMCLI con s con-vpn-1
lang: pl_PL.UTF-8
returncode: 0
stdout: 4297 bytes
>>>
connection.id: con-vpn-1
connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP
connection.stable-id: --
connection.type: vpn
connection.interface-name: --
connection.autoconnect: tak
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.auth-retries: -1
connection.timestamp: 0
connection.read-only: nie
connection.permissions: --
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: nieznane
connection.lldp: default
connection.mdns: -1 (default)
ipv4.method: auto
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: ""
ipv4.dns-priority: 0
ipv4.addresses: --
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
ipv4.ignore-auto-routes: nie
ipv4.ignore-auto-dns: nie
ipv4.dhcp-client-id: --
ipv4.dhcp-timeout: 0 (default)
ipv4.dhcp-send-hostname: tak
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.never-default: nie
ipv4.may-fail: tak
ipv4.dad-timeout: -1 (default)
ipv6.method: auto
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: ""
ipv6.dns-priority: 0
ipv6.addresses: --
ipv6.gateway: --
ipv6.routes: --
ipv6.route-metric: -1
ipv6.route-table: 0 (unspec)
ipv6.ignore-auto-routes: nie
ipv6.ignore-auto-dns: nie
ipv6.never-default: nie
ipv6.may-fail: tak
ipv6.ip6-privacy: -1 (unknown)
ipv6.addr-gen-mode: stable-privacy
ipv6.dhcp-send-hostname: tak
ipv6.dhcp-hostname: --
ipv6.token: --
vpn.service-type: org.freedesktop.NetworkManager.openvpn
vpn.user-name: --
vpn.data: key1 = val1, key2 = val2, key3 = val3
vpn.secrets: <hidden>
vpn.persistent: nie
vpn.timeout: 0
proxy.method: none
proxy.browser-only: nie
proxy.pac-url: --
proxy.pac-script: --
GENERAL.NAME: con-vpn-1
GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP
GENERAL.DEVICES: wlan0
GENERAL.STATE: aktywowano
GENERAL.DEFAULT: nie
GENERAL.DEFAULT6: nie
GENERAL.SPEC-OBJECT: --
GENERAL.VPN: tak
GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3
GENERAL.ZONE: --
GENERAL.MASTER-PATH: --
VPN.TYPE: openvpn
VPN.USERNAME: --
VPN.GATEWAY: --
VPN.BANNER: --
VPN.VPN-STATE: 0 - nieznane
VPN.CFG[1]: key1 = val1
VPN.CFG[2]: key2 = val2
VPN.CFG[3]: key3 = val3
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:854:test_004()/23
cmd: $NMCLI con s con-vpn-1
lang: C
returncode: 0
stdout: 4319 bytes
>>>
connection.id: con-vpn-1
connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP
connection.stable-id: --
connection.type: vpn
connection.interface-name: --
connection.autoconnect: yes
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.auth-retries: -1
connection.timestamp: 0
connection.read-only: no
connection.permissions: --
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: unknown
connection.lldp: default
connection.mdns: -1 (default)
ipv4.method: auto
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: ""
ipv4.dns-priority: 0
ipv4.addresses: --
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-timeout: 0 (default)
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.never-default: no
ipv4.may-fail: yes
ipv4.dad-timeout: -1 (default)
ipv6.method: auto
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: ""
ipv6.dns-priority: 0
ipv6.addresses: --
ipv6.gateway: --
ipv6.routes: --
ipv6.route-metric: -1
ipv6.route-table: 0 (unspec)
ipv6.ignore-auto-routes: no
ipv6.ignore-auto-dns: no
ipv6.never-default: no
ipv6.may-fail: yes
ipv6.ip6-privacy: -1 (unknown)
ipv6.addr-gen-mode: stable-privacy
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: --
ipv6.token: --
vpn.service-type: org.freedesktop.NetworkManager.openvpn
vpn.user-name: --
vpn.data: key1 = val1, key2 = val2, key3 = val3
vpn.secrets: <hidden>
vpn.persistent: no
vpn.timeout: 0
proxy.method: none
proxy.browser-only: no
proxy.pac-url: --
proxy.pac-script: --
GENERAL.NAME: con-vpn-1
GENERAL.UUID: UUID-con-vpn-1-REPLACED-REPLACED-REP
GENERAL.DEVICES: wlan0
GENERAL.STATE: activated
GENERAL.DEFAULT: no
GENERAL.DEFAULT6: no
GENERAL.SPEC-OBJECT: --
GENERAL.VPN: yes
GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/Connection/3
GENERAL.ZONE: --
GENERAL.MASTER-PATH: --
VPN.TYPE: openvpn
VPN.USERNAME: --
VPN.GATEWAY: --
VPN.BANNER: *** VPN connection con-vpn-1 ***
VPN.VPN-STATE: 5 - VPN connected
VPN.CFG[1]: key1 = val1
VPN.CFG[2]: key2 = val2
VPN.CFG[3]: key3 = val3
<<<
stderr: 0 bytes
>>>
<<<
location: clients/tests/test-client.py:854:test_004()/24
cmd: $NMCLI con s con-vpn-1
lang: pl_PL.UTF-8
returncode: 0
stdout: 4337 bytes
>>>
connection.id: con-vpn-1
connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP
connection.stable-id: --
connection.type: vpn
connection.interface-name: --
connection.autoconnect: tak
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.auth-retries: -1
connection.timestamp: 0
connection.read-only: nie
connection.permissions: --
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: nieznane
connection.lldp: default
connection.mdns: -1 (default)
ipv4.method: auto
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: ""
ipv4.dns-priority: 0
ipv4.addresses: --
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
ipv4.ignore-auto-routes: nie
ipv4.ignore-auto-dns: nie
ipv4.dhcp-client-id: --
ipv4.dhcp-timeout: 0 (default)
ipv4.dhcp-send-hostname: tak
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.never-default: nie
ipv4.may-fail: tak
ipv4.dad-timeout: -1 (default)
ipv6.method: auto
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: ""
ipv6.dns-priority: 0
ipv6.addresses: --
ipv6.gateway: --
ipv6.routes: --
ipv6.route-metric: -1
ipv6.route-table: 0 (unspec)
ipv6.ignore-auto-routes: nie
ipv6.ignore-auto-dns: nie
ipv6.never-default: nie
ipv6.may-fail: tak
ipv6.ip6-privacy: -1 (unknown)
ipv6.addr-gen-mode: stable-privacy
ipv6.dhcp-send-hostname: tak
ipv6.dhcp-hostname: --
ipv6.token: --
vpn.service-type: org.freedesktop.NetworkManager.openvpn
vpn.user-name: --
vpn.data: key1 = val1, key2 = val2, key3 = val3
vpn.secrets: <hidden>
vpn.persistent: nie
vpn.timeout: 0