fixing copy constructor error and adding test for it (#9711)

This commit is contained in:
Josh Slocum 2023-03-15 17:33:16 -05:00 committed by GitHub
parent dbcab0b1bd
commit b4eb665f1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -56,13 +56,13 @@ struct BlobMetadataDetailsRef {
explicit BlobMetadataDetailsRef(Arena& ar,
BlobMetadataDomainId domainId,
Optional<StringRef> base,
Optional<StringRef> baseLocation,
VectorRef<StringRef> partitions,
double refreshAt,
double expireAt)
: domainId(domainId), partitions(ar, partitions), refreshAt(refreshAt), expireAt(expireAt) {
if (base.present()) {
base = StringRef(ar, base.get());
if (baseLocation.present()) {
base = StringRef(ar, baseLocation.get());
}
}

View File

@ -1539,6 +1539,7 @@ void testGetBlobMetadataRequestBody(Reference<RESTKmsConnectorCtx> ctx) {
for (const auto& detail : details) {
auto it = domainIds.find(detail.domainId);
ASSERT(it != domainIds.end());
ASSERT(detail.base.present() || !detail.partitions.empty());
}
if (refreshKmsUrls) {
validateKmsUrls(ctx);