forked from clan/clan-core
schemathesis: Add as runnable application instead of library to resolve httpx dependency collision issue
This commit is contained in:
parent
9af58c7bac
commit
48f0381fb5
@ -29,7 +29,7 @@
|
|||||||
]}"
|
]}"
|
||||||
ROOT=$(git rev-parse --show-toplevel)
|
ROOT=$(git rev-parse --show-toplevel)
|
||||||
cd "$ROOT/pkgs/clan-cli"
|
cd "$ROOT/pkgs/clan-cli"
|
||||||
nix develop "$ROOT#clan-cli" -c bash -c 'TMPDIR=/tmp python -m clan_cli webui --no-open --port 2979'
|
nix develop "$ROOT#clan-cli" -c bash -c 'TMPDIR=/tmp clan webui --no-open --port 5757'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
@ -42,7 +42,7 @@
|
|||||||
echo "Started mock api with pid $MOCK_API_PID"
|
echo "Started mock api with pid $MOCK_API_PID"
|
||||||
function cleanup {
|
function cleanup {
|
||||||
echo "Stopping server..."
|
echo "Stopping server..."
|
||||||
pkill -9 -f "python -m clan_cli webui"
|
pkill -9 -f "python -m clan webui --no-open --port 5757"
|
||||||
}
|
}
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
@ -59,7 +59,7 @@
|
|||||||
ROOT=$(git rev-parse --show-toplevel)
|
ROOT=$(git rev-parse --show-toplevel)
|
||||||
cd "$ROOT/pkgs/clan-cli"
|
cd "$ROOT/pkgs/clan-cli"
|
||||||
nix develop "$ROOT#clan-cli" -c bash -c 'TMPDIR=/tmp st auth login RHtr8nLtz77tqRP8yUGyf-Flv_9SLI'
|
nix develop "$ROOT#clan-cli" -c bash -c 'TMPDIR=/tmp st auth login RHtr8nLtz77tqRP8yUGyf-Flv_9SLI'
|
||||||
nix develop "$ROOT#clan-cli" -c bash -c 'TMPDIR=/tmp st run http://localhost:2979/openapi.json --experimental=openapi-3.1 --report --workers 8 --max-response-time=50 --request-timeout=1000 -M GET'
|
nix develop "$ROOT#clan-cli" -c bash -c 'TMPDIR=/tmp st run http://localhost:5757/openapi.json --experimental=openapi-3.1 --report --workers 8 --max-response-time=50 --request-timeout=1000 -M GET'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
12
flake.lock
12
flake.lock
@ -98,11 +98,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1700044047,
|
"lastModified": 1700463343,
|
||||||
"narHash": "sha256-L7sCQsyETMknCztejhFCb7QXoa7k92Pv/e8X7OudAuk=",
|
"narHash": "sha256-6HpM0MP3V6jYsnAklIkjw6Wa+L0Zgokq+OBduVBR3n4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "68baab123fc4f898ebb6191eca8ae9383604f5f5",
|
"rev": "3fb937a1e9f4157f57011965b99fcb7f4139d9ad",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -114,11 +114,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-for-deal": {
|
"nixpkgs-for-deal": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1699470058,
|
"lastModified": 1700490099,
|
||||||
"narHash": "sha256-//c1SEENoNFEDtp8x5lokNxsU9lZjyNkEf5k3OJADTs=",
|
"narHash": "sha256-IDZGtMvddtEdYr7BUtXsQNPhVXcLzWj6AC9s1wRkZlo=",
|
||||||
"owner": "Luis-Hebendanz",
|
"owner": "Luis-Hebendanz",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "842a157b727ad9712d41a80d1e1564e4e6bbe697",
|
"rev": "32ea44ece77a5bad662685acf4652cc984e2df3f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
, deal
|
, deal
|
||||||
, rope
|
, rope
|
||||||
, clan-core-path
|
, clan-core-path
|
||||||
|
, schemathesis
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -47,14 +48,13 @@ let
|
|||||||
];
|
];
|
||||||
|
|
||||||
pytestDependencies = runtimeDependencies ++ dependencies ++ [
|
pytestDependencies = runtimeDependencies ++ dependencies ++ [
|
||||||
|
#schemathesis # optional for http fuzzing
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
pytest-subprocess
|
pytest-subprocess
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
pytest-timeout
|
pytest-timeout
|
||||||
deal
|
deal
|
||||||
# commented out because it injects an incompatible httpx version into our python env
|
|
||||||
#schemathesis
|
|
||||||
remote-pdb
|
remote-pdb
|
||||||
ipdb
|
ipdb
|
||||||
openssh
|
openssh
|
||||||
|
@ -31,12 +31,14 @@
|
|||||||
{
|
{
|
||||||
devShells.clan-cli = pkgs.callPackage ./shell.nix {
|
devShells.clan-cli = pkgs.callPackage ./shell.nix {
|
||||||
inherit (self'.packages) clan-cli ui-assets nix-unit;
|
inherit (self'.packages) clan-cli ui-assets nix-unit;
|
||||||
|
|
||||||
};
|
};
|
||||||
packages = {
|
packages = {
|
||||||
clan-cli = pkgs.python3.pkgs.callPackage ./default.nix {
|
clan-cli = pkgs.python3.pkgs.callPackage ./default.nix {
|
||||||
inherit (self'.packages) ui-assets;
|
inherit (self'.packages) ui-assets;
|
||||||
inherit (inputs) nixpkgs;
|
inherit (inputs) nixpkgs;
|
||||||
inherit (inputs.nixpkgs-for-deal.legacyPackages.${system}.python3Packages) deal;
|
inherit (inputs.nixpkgs-for-deal.legacyPackages.${system}.python3Packages) deal;
|
||||||
|
inherit (inputs.nixpkgs-for-deal.legacyPackages.${system}.python3Packages) schemathesis;
|
||||||
clan-core-path = clanCoreWithVendoredDeps;
|
clan-core-path = clanCoreWithVendoredDeps;
|
||||||
};
|
};
|
||||||
inherit (self'.packages.clan-cli) clan-openapi;
|
inherit (self'.packages.clan-cli) clan-openapi;
|
||||||
|
@ -54,9 +54,5 @@ mkShell {
|
|||||||
$tmp_path/share/zsh/site-functions
|
$tmp_path/share/zsh/site-functions
|
||||||
register-python-argcomplete --shell fish clan > $tmp_path/share/fish/vendor_completions.d/clan.fish
|
register-python-argcomplete --shell fish clan > $tmp_path/share/fish/vendor_completions.d/clan.fish
|
||||||
register-python-argcomplete --shell bash clan > $tmp_path/share/bash-completion/completions/clan
|
register-python-argcomplete --shell bash clan > $tmp_path/share/bash-completion/completions/clan
|
||||||
|
|
||||||
|
|
||||||
./bin/clan flakes create example_clan
|
|
||||||
./bin/clan machines create examplemachine example_clan
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user