diff --git a/tests/unit/libstore/data/libstore/worker-protocol/unkeyed-valid-path-info-1.15.bin b/tests/unit/libstore/data/libstore/worker-protocol/unkeyed-valid-path-info-1.15.bin deleted file mode 100644 index e69ccbe83..000000000 Binary files a/tests/unit/libstore/data/libstore/worker-protocol/unkeyed-valid-path-info-1.15.bin and /dev/null differ diff --git a/tests/unit/libstore/data/libstore/worker-protocol/unkeyed-valid-path-info.bin b/tests/unit/libstore/data/libstore/worker-protocol/unkeyed-valid-path-info.bin new file mode 100644 index 000000000..7bf72e0f4 Binary files /dev/null and b/tests/unit/libstore/data/libstore/worker-protocol/unkeyed-valid-path-info.bin differ diff --git a/tests/unit/libstore/data/libstore/worker-protocol/valid-path-info-1.15.bin b/tests/unit/libstore/data/libstore/worker-protocol/valid-path-info-1.15.bin deleted file mode 100644 index 7adc8dd44..000000000 Binary files a/tests/unit/libstore/data/libstore/worker-protocol/valid-path-info-1.15.bin and /dev/null differ diff --git a/tests/unit/libstore/data/libstore/worker-protocol/valid-path-info-1.16.bin b/tests/unit/libstore/data/libstore/worker-protocol/valid-path-info.bin similarity index 100% rename from tests/unit/libstore/data/libstore/worker-protocol/valid-path-info-1.16.bin rename to tests/unit/libstore/data/libstore/worker-protocol/valid-path-info.bin diff --git a/tests/unit/libstore/worker-protocol.cc b/tests/unit/libstore/worker-protocol.cc index 2d6fbd58f..f36de9cf9 100644 --- a/tests/unit/libstore/worker-protocol.cc +++ b/tests/unit/libstore/worker-protocol.cc @@ -18,9 +18,9 @@ struct WorkerProtoTest : VersionedProtoTest { /** * For serializers that don't care about the minimum version, we - * used the oldest one: 1.0. + * have to use the minimum supported to not throw an assert. */ - WorkerProto::Version defaultVersion = 1 << 8 | 0; + WorkerProto::Version defaultVersion = MIN_SUPPORTED_WORKER_PROTO_VERSION; }; @@ -331,9 +331,9 @@ VERSIONED_CHARACTERIZATION_TEST( VERSIONED_CHARACTERIZATION_TEST( WorkerProtoTest, - unkeyedValidPathInfo_1_15, - "unkeyed-valid-path-info-1.15", - 1 << 8 | 15, + unkeyedValidPathInfo, + "unkeyed-valid-path-info", + defaultVersion, (std::tuple { ({ UnkeyedValidPathInfo info { @@ -363,56 +363,9 @@ VERSIONED_CHARACTERIZATION_TEST( VERSIONED_CHARACTERIZATION_TEST( WorkerProtoTest, - validPathInfo_1_15, - "valid-path-info-1.15", - 1 << 8 | 15, - (std::tuple { - ({ - ValidPathInfo info { - StorePath { - "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-bar", - }, - UnkeyedValidPathInfo { - Hash::parseSRI("sha256-FePFYIlMuycIXPZbWi7LGEiMmZSX9FMbaQenWBzm1Sc="), - }, - }; - info.registrationTime = 23423; - info.narSize = 34878; - info; - }), - ({ - ValidPathInfo info { - StorePath { - "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-bar", - }, - UnkeyedValidPathInfo { - Hash::parseSRI("sha256-FePFYIlMuycIXPZbWi7LGEiMmZSX9FMbaQenWBzm1Sc="), - }, - }; - info.deriver = StorePath { - "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-bar.drv", - }; - info.references = { - // other reference - StorePath { - "g1w7hyyyy1w7hy3qg1w7hy3qgqqqqy3q-foo", - }, - // self reference - StorePath { - "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-bar", - }, - }; - info.registrationTime = 23423; - info.narSize = 34878; - info; - }), - })) - -VERSIONED_CHARACTERIZATION_TEST( - WorkerProtoTest, - validPathInfo_1_16, - "valid-path-info-1.16", - 1 << 8 | 16, + validPathInfo, + "valid-path-info", + defaultVersion, (std::tuple { ({ ValidPathInfo info {