Skip to content

interactive: fix wrong connection use if multiple namespaces used

Larry Shen requested to merge atline/lava:fix_connection_for_interact into master

The current interactive test action will use the connection from previous action in pipeline, this will make bug if there is multiple namespace defined in job, something like next:

- boot:
    namespace: mcore
    method: new_connection
    connection: uart1
    timeout:
      seconds: 10

- deploy:
    namespace: test_suite_1

- boot:
    namespace: test_suite_1
    connection-namespace: burning-uboot_1
    method: u-boot
    commands: nfs

- test:
    namespace: mcore
    timeout:
      minutes: 4
    interactive:
    - name: input
      prompts: ["Escape character"]
      script:
      - command: abc
        name: abc

- test:
    namespace: test_suite_1
    timeout:
      minutes: 10080

Above job will write abc to ACore still and cause next error, but the expectation is the abc should be written to MCore.

image

This logic already been implemented in shell, just porting to interactive.

Merge request reports