1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
(cherry picked from commit 0d2e1da774580917dcf6a05c6be81ebfe823adef)
This commit is contained in:
Rick V 2019-05-22 04:33:11 -05:00
parent 43296127cd
commit f0a4b93431
No known key found for this signature in database
GPG key ID: C0EDC8723FDC3465

View file

@ -95,13 +95,13 @@ TEST_F(ServiceIdentityTest, EnsureKeys)
.WillOnce(WithArg< 0 >(FillArg< PQKeyPair >(0x03)));
service::Identity identity;
ASSERT_TRUE(identity.EnsureKeys(p, &crypto));
ASSERT_TRUE(identity.EnsureKeys(p.string(), &crypto));
ASSERT_TRUE(fs::exists(fs::status(p)));
// Verify what is on disk is what is what was generated
service::Identity other;
// No need to set more mocks, as we shouldn't need to re-keygen
ASSERT_TRUE(other.EnsureKeys(p, &crypto));
ASSERT_TRUE(other.EnsureKeys(p.string(), &crypto));
ASSERT_EQ(identity, other);
}
@ -115,7 +115,7 @@ TEST_F(ServiceIdentityTest, EnsureKeysDir)
ASSERT_TRUE(fs::create_directory(p, code)) << code;
service::Identity identity;
ASSERT_FALSE(identity.EnsureKeys(p, &crypto));
ASSERT_FALSE(identity.EnsureKeys(p.string(), &crypto));
}
TEST_F(ServiceIdentityTest, EnsureKeysBrokenFile)
@ -132,5 +132,5 @@ TEST_F(ServiceIdentityTest, EnsureKeysBrokenFile)
file.close();
service::Identity identity;
ASSERT_FALSE(identity.EnsureKeys(p, &crypto));
ASSERT_FALSE(identity.EnsureKeys(p.string(), &crypto));
}