Skip to content

nmtui: sanitize the environment a little

Lubomir Rintel requested to merge lr/nmtui-lang into master

While the nmtui tests work reliably in the CI, strange stuff happens when I ssh to the machine:

  Scenario: nmtui - vlan - deactivate connection without autoconnect
    * Prepare virtual terminal environment ... passed in 0.001s
    * Prepare new connection of type "VLAN" named "eth1.99" ... failed in 20.640s
Assertion Failed: FAILED SUB-STEP: * Choose the connection type "VLAN"
Substep info: Assertion Failed: Could not go to option 'VLAN' on screen!

         ┌──────────────────────┤ New Connection ├──────────────────────┐
         │                                                              │
         │ Select the type of connection you wish to create.            │
         │                                                              │
         │                        Bridge      ↑                         │
         │                        IP tunnel   ▒                         │
         │                        Team        ▒                         │
                                                    │                        Vet
h        ▮                        █LAN        ↓                         │
         │                                                              │
         │                                            <Cancel> <Create> │
         │                                                              │
         └──────────────────────────────────────────────────────────────┘

Apparently, the screen seems to have been redrawn in a fashion that confuses whatever emulates the terminal. Seems to be caused by some combination of environment variables passed from my workstation.

Let's sanitize the environment in order to not make the remote terminal influence the emulated terminal output.

Merge request reports