Read image version from the MANIFEST.
According to Patrick, all information regarding the
image must be read from the MANIFEST, such as version.
Also we must never open/read pnor.toc.
Change-Id: Icf9f83f9ec055de21e2cf13e4ab4ab4afafc2af7
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/test/utest.cpp b/test/utest.cpp
index 4da45a5..4fd1e78 100644
--- a/test/utest.cpp
+++ b/test/utest.cpp
@@ -37,17 +37,17 @@
/** @brief Make sure we correctly get the version from getVersion()*/
TEST_F(VersionTest, TestGetVersion)
{
- auto tocFilePath = _directory + "/" + "pnor.toc";
+ auto manifestFilePath = _directory + "/" + "MANIFEST";
auto version = "test-version";
std::ofstream file;
- file.open(tocFilePath, std::ofstream::out);
+ file.open(manifestFilePath, std::ofstream::out);
ASSERT_TRUE(file.is_open());
file << "version=" << version << std::endl;
file.close();
- EXPECT_EQ(Version::getVersion(tocFilePath), version);
+ EXPECT_EQ(Version::getVersion(manifestFilePath), version);
}
/** @brief Make sure we correctly get the Id from getId()*/