1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 02:43:54 +02:00

Convert Machine::speedFactor from a non-neg int to a non-neg float

The short motivation is to match Hydra, so we can de-dup.

The long version is layed out in
https://github.com/NixOS/nix/issues/9840.
This commit is contained in:
John Ericson 2024-01-24 01:03:07 -05:00
parent f1b0304153
commit 1e24db6f9a
3 changed files with 17 additions and 5 deletions

View file

@ -14,6 +14,7 @@ using testing::SizeIs;
using nix::absPath;
using nix::FormatError;
using nix::UsageError;
using nix::getMachines;
using nix::Machine;
using nix::Machines;
@ -133,7 +134,7 @@ TEST(machines, getMachinesWithIncorrectFormat) {
settings.builders = "nix@scratchy.labs.cs.uu.nl - - 8 three";
EXPECT_THROW(getMachines(), FormatError);
settings.builders = "nix@scratchy.labs.cs.uu.nl - - 8 -3";
EXPECT_THROW(getMachines(), FormatError);
EXPECT_THROW(getMachines(), UsageError);
settings.builders = "nix@scratchy.labs.cs.uu.nl - - 8 3 - - BAD_BASE64";
EXPECT_THROW(getMachines(), FormatError);
}