zebrunner / mcloud-agent

20 stars 12 forks source link

on start obligatory re-create any existing exited containers #122

Closed vdelendik closed 2 years ago

vdelendik commented 2 years ago

as usb connect incrementы symlink constantly we can't reuse old container as linked device is not accessible. In v2.2 we are going to define better strategy on exit. It means that containers in Exited state might be on server which can't be reused at all. so every start operation should forcibly recreate container

vdelendik commented 2 years ago

on device connect when udev launch add) we forcibly remove any existing containers and start from scratch. so to test we have to disable containers removal on disconnect updating /usr/local/bin/zebrunner-farm - commenting/disabling action remove:

    remove)
        echo "down ${ID_SERIAL_SHORT}"
        ;;
  1. disconnect device -> existing session in stf crashed but device potentially still among Available -> in mcloud-grid appium still registered -> two device containers are up&running (in unhealthy state after 30-60s)

  2. double check device containers creation date

  3. try to execute any automated test vs disconnected devices -> nothing is started, request should be displayed in mcloud/grid/console queue. if nothing connected for 240s then test should fail

  4. connect device -> old containers MUST be recreated and started

  5. use device in stf and via automation to double check

vdelendik commented 2 years ago

verified with @dhreben. both iOS and Android handled correctly for test automation. as about manual usage still iOS is shown as available in STF but it suppose to be fixed in https://github.com/zebrunner/stf/issues/411