Skip to content

Commit

Permalink
Fix review findings #1
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrChaika committed Jul 24, 2023
1 parent efa821e commit 00055a3
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions utest/TestSelfUpdateScenarios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,12 +411,20 @@ namespace {
EXPECT_EQ(sentMessages, expectedMessages);
}

TEST_F(TestSelfUpdateScenarios, downloadFromHTTPFails_endsInFailedState)
class TestSelfUpdateScenariosP
: public ::testing::WithParamInterface<std::string>
, public virtual TestSelfUpdateScenarios
{
protected:
std::string protocol;
};

TEST_P(TestSelfUpdateScenariosP, downloadViaUnsupportedProtocolFails_endsInFailedState)
{
expectedStates = {"Uninitialized", "Connected", "Downloading", "Failed"};
expectedMessages = {M::SystemVersion, M::Identifying, M::Identified, M::DownloadFailed};

downloadProtocol = "http";
downloadProtocol = GetParam();

sua.init();
start();
Expand All @@ -428,4 +436,12 @@ namespace {
EXPECT_EQ(sentMessages, expectedMessages);
}

INSTANTIATE_TEST_CASE_P(
TestSelfUpdateScenariosViaUnsupportedProtocols,
TestSelfUpdateScenariosP,
::testing::Values(
"ftp", "sftp", "smb", "smbs", "ldap", "ldaps"

This comment has been minimized.

Copy link
@OlavHerbst

OlavHerbst Jul 24, 2023

Contributor

"http" missing

)
);

This comment has been minimized.

Copy link
@OlavHerbst

OlavHerbst Jul 24, 2023

Contributor

(offtopic) In SelfUpdateAgent.cpp#29 #include "Logger.h" seems to be obsolete.

}

0 comments on commit 00055a3

Please sign in to comment.