aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/libstore')
-rw-r--r--tests/unit/libstore/common-protocol.cc8
-rw-r--r--tests/unit/libstore/derivation.cc4
-rw-r--r--tests/unit/libstore/filetransfer.cc3
-rw-r--r--tests/unit/libstore/serve-protocol.cc10
-rw-r--r--tests/unit/libstore/worker-protocol.cc10
5 files changed, 17 insertions, 18 deletions
diff --git a/tests/unit/libstore/common-protocol.cc b/tests/unit/libstore/common-protocol.cc
index 86ba537db..9523c9acb 100644
--- a/tests/unit/libstore/common-protocol.cc
+++ b/tests/unit/libstore/common-protocol.cc
@@ -102,15 +102,15 @@ CHARACTERIZATION_TEST(
(std::tuple<ContentAddress, ContentAddress, ContentAddress> {
ContentAddress {
.method = TextIngestionMethod {},
- .hash = hashString(HashType::htSHA256, "Derive(...)"),
+ .hash = hashString(HashType::SHA256, "Derive(...)"),
},
ContentAddress {
.method = FileIngestionMethod::Flat,
- .hash = hashString(HashType::htSHA1, "blob blob..."),
+ .hash = hashString(HashType::SHA1, "blob blob..."),
},
ContentAddress {
.method = FileIngestionMethod::Recursive,
- .hash = hashString(HashType::htSHA256, "(...)"),
+ .hash = hashString(HashType::SHA256, "(...)"),
},
}))
@@ -197,7 +197,7 @@ CHARACTERIZATION_TEST(
std::optional {
ContentAddress {
.method = FileIngestionMethod::Flat,
- .hash = hashString(HashType::htSHA1, "blob blob..."),
+ .hash = hashString(HashType::SHA1, "blob blob..."),
},
},
}))
diff --git a/tests/unit/libstore/derivation.cc b/tests/unit/libstore/derivation.cc
index ca0cdff71..f6401a095 100644
--- a/tests/unit/libstore/derivation.cc
+++ b/tests/unit/libstore/derivation.cc
@@ -148,7 +148,7 @@ TEST_JSON(DynDerivationTest, caFixedText,
TEST_JSON(CaDerivationTest, caFloating,
(DerivationOutput::CAFloating {
.method = FileIngestionMethod::Recursive,
- .hashType = htSHA256,
+ .hashType = HashType::SHA256,
}),
"drv-name", "output-name")
@@ -159,7 +159,7 @@ TEST_JSON(DerivationTest, deferred,
TEST_JSON(ImpureDerivationTest, impure,
(DerivationOutput::Impure {
.method = FileIngestionMethod::Recursive,
- .hashType = htSHA256,
+ .hashType = HashType::SHA256,
}),
"drv-name", "output-name")
diff --git a/tests/unit/libstore/filetransfer.cc b/tests/unit/libstore/filetransfer.cc
index 6e8cf3bbe..71e7392fc 100644
--- a/tests/unit/libstore/filetransfer.cc
+++ b/tests/unit/libstore/filetransfer.cc
@@ -6,7 +6,6 @@
#include <future>
#include <gtest/gtest.h>
#include <netinet/in.h>
-#include <stdexcept>
#include <string>
#include <string_view>
#include <sys/poll.h>
@@ -130,7 +129,7 @@ serveHTTP(std::string status, std::string headers, std::function<std::string()>
TEST(FileTransfer, exceptionAbortsDownload)
{
- struct Done
+ struct Done : std::exception
{};
auto ft = makeFileTransfer();
diff --git a/tests/unit/libstore/serve-protocol.cc b/tests/unit/libstore/serve-protocol.cc
index 6cc60ca3e..c6793be74 100644
--- a/tests/unit/libstore/serve-protocol.cc
+++ b/tests/unit/libstore/serve-protocol.cc
@@ -53,15 +53,15 @@ VERSIONED_CHARACTERIZATION_TEST(
(std::tuple<ContentAddress, ContentAddress, ContentAddress> {
ContentAddress {
.method = TextIngestionMethod {},
- .hash = hashString(HashType::htSHA256, "Derive(...)"),
+ .hash = hashString(HashType::SHA256, "Derive(...)"),
},
ContentAddress {
.method = FileIngestionMethod::Flat,
- .hash = hashString(HashType::htSHA1, "blob blob..."),
+ .hash = hashString(HashType::SHA1, "blob blob..."),
},
ContentAddress {
.method = FileIngestionMethod::Recursive,
- .hash = hashString(HashType::htSHA256, "(...)"),
+ .hash = hashString(HashType::SHA256, "(...)"),
},
}))
@@ -278,7 +278,7 @@ VERSIONED_CHARACTERIZATION_TEST(
"foo",
FixedOutputInfo {
.method = FileIngestionMethod::Recursive,
- .hash = hashString(HashType::htSHA256, "(...)"),
+ .hash = hashString(HashType::SHA256, "(...)"),
.references = {
.others = {
StorePath {
@@ -348,7 +348,7 @@ VERSIONED_CHARACTERIZATION_TEST(
std::optional {
ContentAddress {
.method = FileIngestionMethod::Flat,
- .hash = hashString(HashType::htSHA1, "blob blob..."),
+ .hash = hashString(HashType::SHA1, "blob blob..."),
},
},
}))
diff --git a/tests/unit/libstore/worker-protocol.cc b/tests/unit/libstore/worker-protocol.cc
index f36de9cf9..92a33f595 100644
--- a/tests/unit/libstore/worker-protocol.cc
+++ b/tests/unit/libstore/worker-protocol.cc
@@ -55,15 +55,15 @@ VERSIONED_CHARACTERIZATION_TEST(
(std::tuple<ContentAddress, ContentAddress, ContentAddress> {
ContentAddress {
.method = TextIngestionMethod {},
- .hash = hashString(HashType::htSHA256, "Derive(...)"),
+ .hash = hashString(HashType::SHA256, "Derive(...)"),
},
ContentAddress {
.method = FileIngestionMethod::Flat,
- .hash = hashString(HashType::htSHA1, "blob blob..."),
+ .hash = hashString(HashType::SHA1, "blob blob..."),
},
ContentAddress {
.method = FileIngestionMethod::Recursive,
- .hash = hashString(HashType::htSHA256, "(...)"),
+ .hash = hashString(HashType::SHA256, "(...)"),
},
}))
@@ -417,7 +417,7 @@ VERSIONED_CHARACTERIZATION_TEST(
"foo",
FixedOutputInfo {
.method = FileIngestionMethod::Recursive,
- .hash = hashString(HashType::htSHA256, "(...)"),
+ .hash = hashString(HashType::SHA256, "(...)"),
.references = {
.others = {
StorePath {
@@ -492,7 +492,7 @@ VERSIONED_CHARACTERIZATION_TEST(
std::optional {
ContentAddress {
.method = FileIngestionMethod::Flat,
- .hash = hashString(HashType::htSHA1, "blob blob..."),
+ .hash = hashString(HashType::SHA1, "blob blob..."),
},
},
}))