diff options
author | Krzysztof Jackiewicz <k.jackiewicz@samsung.com> | 2018-09-21 11:48:11 +0200 |
---|---|---|
committer | Krzysztof Jackiewicz <k.jackiewicz@samsung.com> | 2018-10-19 14:31:50 +0200 |
commit | f450ffaa267bd33e8ece2354998ffcf6dac839b0 (patch) | |
tree | f520acef86c6072c62e05793337d8a6bf3d18098 | |
parent | fe7aaaa1c46cf37dc498827b8f355c7d04a6a65a (diff) | |
download | key-manager-f450ffaa267bd33e8ece2354998ffcf6dac839b0.tar.gz key-manager-f450ffaa267bd33e8ece2354998ffcf6dac839b0.tar.bz2 key-manager-f450ffaa267bd33e8ece2354998ffcf6dac839b0.zip |
Fix internal migration tests
Migration tests use existing databases so test alias names must not be changed
Change-Id: I4277125a9031d822d1666e51a8ee54466901e2a0
-rw-r--r-- | tests/DBFixture.cpp | 8 | ||||
-rw-r--r-- | tests/DBFixture.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/DBFixture.cpp b/tests/DBFixture.cpp index a7e42fe6..67241c55 100644 --- a/tests/DBFixture.cpp +++ b/tests/DBFixture.cpp @@ -92,7 +92,7 @@ void DBFixture::generate_name(unsigned int id, Name &output) void DBFixture::generate_owner(unsigned int id, ClientId &output) { std::stringstream ss; - ss << "owner_no_" << id; + ss << "label_no_" << id; output = ss.str(); } @@ -195,7 +195,7 @@ void DBFixture::check_DB_integrity(const DB::Row &rowPattern) BOOST_REQUIRE_NO_THROW(m_db.saveRow(rowPattern)); DB::Crypto::RowOptional optional_row; - BOOST_REQUIRE_NO_THROW(optional_row = m_db.getRow("name", "owner", + BOOST_REQUIRE_NO_THROW(optional_row = m_db.getRow(m_default_name, m_default_owner, DataType::BINARY_DATA)); BOOST_REQUIRE_MESSAGE(optional_row, "Select didn't return any row"); @@ -205,11 +205,11 @@ void DBFixture::check_DB_integrity(const DB::Row &rowPattern) name_duplicate.dataSize = name_duplicate.data.size(); unsigned int erased; - BOOST_REQUIRE_NO_THROW(erased = m_db.deleteRow("name", "owner")); + BOOST_REQUIRE_NO_THROW(erased = m_db.deleteRow(m_default_name, m_default_owner)); BOOST_REQUIRE_MESSAGE(erased > 0, "Inserted row didn't exist in db"); DB::Crypto::RowOptional row_optional; - BOOST_REQUIRE_NO_THROW(row_optional = m_db.getRow("name", "owner", + BOOST_REQUIRE_NO_THROW(row_optional = m_db.getRow(m_default_name, m_default_owner, DataType::BINARY_DATA)); BOOST_REQUIRE_MESSAGE(!row_optional, "Select should not return row after deletion"); diff --git a/tests/DBFixture.h b/tests/DBFixture.h index 5b40820b..be7e2e02 100644 --- a/tests/DBFixture.h +++ b/tests/DBFixture.h @@ -33,7 +33,7 @@ public: DBFixture(const char *db_fname); constexpr static const char *m_default_name = "name"; - constexpr static const char *m_default_owner = "owner"; + constexpr static const char *m_default_owner = "label"; // ::::::::::::::::::::::::: helper methods ::::::::::::::::::::::::: static void generate_name(unsigned int id, CKM::Name &output); |