-
Notifications
You must be signed in to change notification settings - Fork 61
OTA-2488: Make Virtual Secondary use the new configuration way. #1246
Conversation
c59aa46
to
ea2fb03
Compare
Codecov Report
@@ Coverage Diff @@
## master #1246 +/- ##
==========================================
- Coverage 79.49% 79.37% -0.12%
==========================================
Files 168 167 -1
Lines 10144 10134 -10
==========================================
- Hits 8064 8044 -20
- Misses 2080 2090 +10
Continue to review full report at Codecov.
|
ea2fb03
to
007fd98
Compare
…e the old SecondaryConfig from libaktualizr Signed-off-by: Mike Sul <ext-mykhaylo.sul@here.com>
bfe08ca
to
f79c04a
Compare
|
f55f554
to
f8db802
Compare
f8db802
to
5bb0a62
Compare
Aktualizr aktualizr(conf, storage, http); | ||
UptaneTestCommon::TestAktualizr aktualizr(conf, storage, http); | ||
UptaneTestCommon::addDefaultSecondary(conf, temp_dir2, "sec_serial2", "sec_hwid2"); | ||
if (boost::filesystem::exists(conf.uptane.secondary_config_file)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this if
in an unit test? Shouldn't it fail if the file does not exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I saw that a similar code lies in uptane_common_test.h
. If I understand correctly, this is a test to verify that adding a secondary works after aktualizr
has been instantiated.
If so, a small explanatory comment would be helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is redundant in the test, we actually should verify if the secondary instantiated successfully.
It's required in uptane_common_test.h as this code is shared among many tests including those that does not use secondaries. I will add explanatory comment.
@@ -1,5 +1,5 @@ | |||
#ifndef UPTANE_MANAGEDSECONDARY_H_ | |||
#define UPTANE_MANAGEDSECONDARY_H_ | |||
#ifndef PRIMARY_MANAGEDSECONDARY_H_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include-guard was not updated. VIRTUAL_SECONDARY_MANAGEDSECONDARY_H_
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I did, PRIMARY_MANAGEDSECONDARY_H_ is the one I intended to apply, the first word denotes the namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, my bad that's from our naming conventions and it ends up being a bit confusing here.
It could be prefixed by the directory name but it would get quite big in this case. Or we could keep that.
@@ -1,21 +1,35 @@ | |||
#ifndef UPTANE_VIRTUALSECONDARY_H_ | |||
#define UPTANE_VIRTUALSECONDARY_H_ | |||
#ifndef PRIMARY_VIRTUALSECONDARY_H_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem with include guard.
Signed-off-by: Mike Sul <ext-mykhaylo.sul@here.com>
5bb0a62
to
cef4c6a
Compare
Updated according to the latest comments |
Signed-off-by: Mike Sul ext-mykhaylo.sul@here.com