mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 19:54:05 +00:00
cf8aa48605
Add new test to check if kubo.passthru.repoVersion is set correctly. Also split the existing NixOS VM test into two independent parts. The test already used two independent VMs but just one testScript. This made experimenting with just one of the two VMs slower than it needed to be. It should also increase parallelism slightly since both test scripts can now run at the same time.
14 lines
446 B
Nix
14 lines
446 B
Nix
{ runCommand, kubo }:
|
|
|
|
runCommand "kubo-test-repoVersion" { } ''
|
|
export IPFS_PATH="$TMPDIR"
|
|
"${kubo}/bin/ipfs" init --empty-repo
|
|
declared_repo_version='${kubo.repoVersion}'
|
|
actual_repo_version="$(cat "$IPFS_PATH/version")"
|
|
if [ "$declared_repo_version" != "$actual_repo_version" ]; then
|
|
echo "kubo.repoVersion is not set correctly. It should be $actual_repo_version but is $declared_repo_version."
|
|
exit 1
|
|
fi
|
|
touch "$out"
|
|
''
|