Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Fix some capitalization and spacing consistency issues.
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Vacek <[email protected]>
  • Loading branch information
pattivacek committed Mar 16, 2020
1 parent f965ffb commit f6d0d02
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/libaktualizr/uptane/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ExpiredMetadata : public Exception {
class InvalidMetadata : public Exception {
public:
InvalidMetadata(const std::string& reponame, const std::string& role, const std::string& reason)
: Exception(reponame, "The " + role + " metadata failed to parse:" + reason) {}
: Exception(reponame, "The " + role + " metadata failed to parse: " + reason) {}
~InvalidMetadata() noexcept override = default;
};

Expand All @@ -94,14 +94,14 @@ class BadKeyId : public Exception {
class BadEcuId : public Exception {
public:
BadEcuId(const std::string& reponame)
: Exception(reponame, "The target had an ECU ID that did not match the client's configured ECU id.") {}
: Exception(reponame, "The target had an ECU ID that did not match the client's configured ECU ID.") {}
~BadEcuId() noexcept override = default;
};

class BadHardwareId : public Exception {
public:
BadHardwareId(const std::string& reponame)
: Exception(reponame, "The target had a hardware ID that did not match the client's configured hardware id.") {}
: Exception(reponame, "The target had a hardware ID that did not match the client's configured hardware ID.") {}
~BadHardwareId() noexcept override = default;
};

Expand Down
2 changes: 1 addition & 1 deletion src/libaktualizr/uptane/tuf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void Uptane::BaseMeta::init(const Json::Value &json) {
try {
expiry_ = TimeStamp(json["signed"]["expires"].asString());
} catch (const TimeStamp::InvalidTimeStamp &exc) {
throw Uptane::InvalidMetadata("", "", "Invalid timestamp");
throw Uptane::InvalidMetadata("", "", "invalid timestamp");
}
original_object_ = json;
}
Expand Down
6 changes: 3 additions & 3 deletions src/libaktualizr/uptane/uptane_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1340,17 +1340,17 @@ TEST(Uptane, IgnoreUnknownUpdate) {
auto result = sota_client->fetchMeta();
EXPECT_EQ(result.status, result::UpdateStatus::kError);
EXPECT_STREQ(sota_client->getLastException().what(),
"The target had an ECU ID that did not match the client's configured ECU id.");
"The target had an ECU ID that did not match the client's configured ECU ID.");
sota_client->last_exception = Uptane::Exception{"", ""};
result = sota_client->checkUpdates();
EXPECT_EQ(result.status, result::UpdateStatus::kError);
EXPECT_STREQ(sota_client->getLastException().what(),
"The target had an ECU ID that did not match the client's configured ECU id.");
"The target had an ECU ID that did not match the client's configured ECU ID.");
std::vector<Uptane::Target> packages_to_install = UptaneTestCommon::makePackage("testecuserial", "testecuhwid");
sota_client->last_exception = Uptane::Exception{"", ""};
auto report = sota_client->uptaneInstall(packages_to_install);
EXPECT_STREQ(sota_client->getLastException().what(),
"The target had an ECU ID that did not match the client's configured ECU id.");
"The target had an ECU ID that did not match the client's configured ECU ID.");
EXPECT_EQ(report.ecu_reports.size(), 0);
}

Expand Down

0 comments on commit f6d0d02

Please sign in to comment.