# devvm _links VM: a running client VM's link session, which devvm starts # detached. It takes the client's name alone, refuses a VM that isn't # there or isn't running, and with no links ends at once, having started # nothing. # Refused before anything runs. ! exec devvm _links '' stderr '^devvm: ' ! exec devvm _links devvm-nope-0123456789abcd stderr '^devvm: link_session_failed reason=devvm-nope-0123456789abcd: no such VM$' ! exists $XDG_DATA_HOME/devvm/run # A running client without links: the session ends at once, with no ssh # of its own and no socket. project app exec devvm --network open --no-git-protect vm_name APP app exec devvm _links $APP stderr '^devvm links: devvm-app-[0-9a-f]{14} has no links$' exec sh -c 'grep "^ssh .*link-" "$STUB_LOG" || true; ls "$XDG_DATA_HOME"/devvm/run | grep "^link-" || true' ! stdout . # A stopped client is refused. exec devvm stop ! exec devvm _links $APP stderr '^devvm: vm_not_running vm=devvm-app-[0-9a-f]{14}$'