summaryrefslogtreecommitdiffstats
path: root/test/utest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/utest.cpp')
-rw-r--r--test/utest.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/test/utest.cpp b/test/utest.cpp
index bdca968..33e0576 100644
--- a/test/utest.cpp
+++ b/test/utest.cpp
@@ -14,7 +14,6 @@ namespace fs = std::experimental::filesystem;
constexpr auto path = "/dummy/user";
constexpr auto testShadow = "/tmp/__tshadow__";
-constexpr auto shadowCopy = "/tmp/__tshadowCopy__";
constexpr auto shadowCompare = "/tmp/__tshadowCompare__";
// New password
@@ -64,11 +63,6 @@ class UserTest : public ::testing::Test
fs::remove(testShadow);
}
- if (fs::exists(shadowCopy))
- {
- fs::remove(shadowCopy);
- }
-
if (fs::exists(shadowCompare))
{
fs::remove(shadowCompare);
@@ -103,8 +97,7 @@ class UserTest : public ::testing::Test
/** @brief Applies the new password */
auto applyPassword()
{
- return user.applyPassword(testShadow, shadowCopy,
- password, salt);
+ return user.applyPassword(testShadow, password, salt);
}
};
@@ -168,22 +161,6 @@ TEST_F(UserTest, applyPassword)
EXPECT_EQ(shadowEntry, shadowCompareEntry);
}
-/** @brief Verifies the shadow copy file is removed
- */
-TEST_F(UserTest, checkShadowCopyRemove)
-{
- // Update the password so that the temp file is in action
- applyPassword();
-
- // Compare the permission of 2 files
- struct stat shadow{};
- struct stat temp{};
-
- stat(testShadow, &shadow);
- stat(shadowCopy, &temp);
- EXPECT_EQ(false, fs::exists(shadowCopy));
-}
-
/** @brief Verifies the permissions are correct
*/
TEST_F(UserTest, verifyShadowPermission)
OpenPOWER on IntegriCloud