clan-config: fix tests
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
, rsync
|
||||
}:
|
||||
let
|
||||
# This provides dummy options for testing clan config and prevents it from
|
||||
# evaluating the flake .#
|
||||
CLAN_OPTIONS_FILE = ./clan_cli/config/jsonschema/options.json;
|
||||
|
||||
dependencies = [ argcomplete ];
|
||||
|
||||
testDependencies = [
|
||||
@@ -48,7 +52,7 @@ python3.pkgs.buildPythonPackage {
|
||||
src = source;
|
||||
format = "pyproject";
|
||||
|
||||
CLAN_OPTIONS_FILE = ./clan_cli/config/jsonschema/options.json;
|
||||
inherit CLAN_OPTIONS_FILE;
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
@@ -58,6 +62,7 @@ python3.pkgs.buildPythonPackage {
|
||||
|
||||
passthru.tests = {
|
||||
clan-mypy = runCommand "clan-mypy" { } ''
|
||||
export CLAN_OPTIONS_FILE="${CLAN_OPTIONS_FILE}"
|
||||
cp -r ${source} ./src
|
||||
chmod +w -R ./src
|
||||
cd ./src
|
||||
@@ -68,6 +73,7 @@ python3.pkgs.buildPythonPackage {
|
||||
{
|
||||
nativeBuildInputs = [ age zerotierone bubblewrap sops nix openssh rsync stdenv.cc ];
|
||||
} ''
|
||||
export CLAN_OPTIONS_FILE="${CLAN_OPTIONS_FILE}"
|
||||
cp -r ${source} ./src
|
||||
chmod +w -R ./src
|
||||
cd ./src
|
||||
|
||||
Reference in New Issue
Block a user