metadata:
    name: lmp-device-register-uuid
    format: "Manual Test Definition 1.0"
    description: "Register a new device with an existing uuid"
    maintainer:
        - brendan.wood@foundries.io
    os:
        - ubuntu
        - openembedded
    scope:
        - functional
    devices:
        - imx6mm-evk
        - imx8mm-evk
        - imx8mm-evk-sec
        - imx8mp-evk
        - imx8mq-evk
        - bcm2711-rpi-4-b
        - stm32mp32mp157c-dk2
    environment:
        - manual-test

run:
    steps:
        - Boot up the device
        - Ensure device is registered to a factory
          Check /var/sota/sql.db  is present on device
        - Copy existing uuid from app.foundries.io factory > device
        - Delete /var/sota/sql.db on device
        - Run "lmp-device-register - u <existing UUID>"

    expected:
        - Device should not be able to register
        - Expected error - Unable to create device HTTP_409 Message Conflict /ota/devices/?
