diff options
Diffstat (limited to 'test/redfish-core/lib/update_service_test.cpp')
-rw-r--r-- | test/redfish-core/lib/update_service_test.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/test/redfish-core/lib/update_service_test.cpp b/test/redfish-core/lib/update_service_test.cpp index 01f2a0e7c9..6b90aef416 100644 --- a/test/redfish-core/lib/update_service_test.cpp +++ b/test/redfish-core/lib/update_service_test.cpp @@ -15,14 +15,22 @@ TEST(UpdateService, ParseTFTPPostitive) // No protocol, schema on url std::optional<TftpUrl> ret = parseTftpUrl("tftp://1.1.1.1/path", std::nullopt, res); - ASSERT_NE(ret, std::nullopt); + ASSERT_TRUE(ret); + if (!ret) + { + return; + } EXPECT_EQ(ret->tftpServer, "1.1.1.1"); EXPECT_EQ(ret->fwFile, "path"); } { // Protocol, no schema on url std::optional<TftpUrl> ret = parseTftpUrl("1.1.1.1/path", "TFTP", res); - ASSERT_NE(ret, std::nullopt); + ASSERT_TRUE(ret); + if (!ret) + { + return; + } EXPECT_EQ(ret->tftpServer, "1.1.1.1"); EXPECT_EQ(ret->fwFile, "path"); } @@ -30,7 +38,11 @@ TEST(UpdateService, ParseTFTPPostitive) // Both protocl and schema on url std::optional<TftpUrl> ret = parseTftpUrl("tftp://1.1.1.1/path", "TFTP", res); - ASSERT_NE(ret, std::nullopt); + ASSERT_TRUE(ret); + if (!ret) + { + return; + } EXPECT_EQ(ret->tftpServer, "1.1.1.1"); EXPECT_EQ(ret->fwFile, "path"); } |