/**
 *  @file ins_ut_config.c
 *  @details config unit test
 *
 */

#include <stdlib.h>
#include <string.h>
#include "unittest.h"
#include "unittest/fw_update/ins_ut_fwupdate.h"
#include "firmware_update.h"
#include "ins_pal_error_code.h"
#include "ins_pal_fs.h"
#define INSLOG_TAG "UtFwupdate"
#include "ins_comm_log.h"

static int32_t InsUT_FwUpdate_Init(int32_t argc, char **argv)
{
    uint32_t ret = 0;
    (void)argc;
    (void)argv;
   
    ret = InsApp_FwUpdateTask_Init();
    if(ret != INSERR_OK)
    {
        INSLOG_E("InsApp_FwUpdateTask_Init failed");
        return ret;
    }

    return ret;
}

static int32_t InsUT_FwUpdate_Start(int32_t argc, char **argv)
{
    uint32_t ret = 0;
    (void)argc;
    (void)argv;
   
    ret = InsApp_FwUpdateTask_Start();
    if(ret != INSERR_OK)
    {
        INSLOG_E("InsApp_FwUpdateTask_Start failed");
        return ret;
    }

    return ret;
}

InsUT_Unittest_CmdInfo_t g_ut_cmd_fwupdate[INSUT_CMDCNT_FW_UPDATE] =
{
    {InsUT_FwUpdate_Init,   0, NULL, "init",           "No Param: Init fw_update"},
    {InsUT_FwUpdate_Start,  0, NULL, "start",          "No Param: Start fw_update"},
};
