2022-10-23 19:51:39 +00:00
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
2022-12-05 17:58:23 +00:00
|
|
|
// SCSI Target Emulator PiSCSI
|
2022-10-23 19:51:39 +00:00
|
|
|
// for Raspberry Pi
|
|
|
|
//
|
|
|
|
// Copyright (C) 2022 Uwe Seimet
|
|
|
|
//
|
|
|
|
// These tests only test up the point where a network connection is required.
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
2022-12-05 17:58:23 +00:00
|
|
|
#include "piscsi/piscsi_service.h"
|
2022-10-23 19:51:39 +00:00
|
|
|
|
2022-12-05 17:58:23 +00:00
|
|
|
TEST(PiscsiServiceTest, LifeCycle)
|
2022-10-23 19:51:39 +00:00
|
|
|
{
|
2022-12-05 17:58:23 +00:00
|
|
|
PiscsiService service;
|
2022-10-23 19:51:39 +00:00
|
|
|
|
|
|
|
EXPECT_TRUE(service.Init(nullptr, 65535));
|
|
|
|
EXPECT_FALSE(service.Init(nullptr, 65536));
|
|
|
|
EXPECT_FALSE(service.Init(nullptr, 0));
|
|
|
|
EXPECT_FALSE(service.Init(nullptr, -1));
|
|
|
|
|
|
|
|
service.Cleanup();
|
|
|
|
}
|