Test WinSCP
This commit is contained in:
parent
8a5bbc3b0b
commit
2a3afcaf65
@ -18,6 +18,7 @@ let
|
|||||||
pkgsHost = import pkgsSrc {};
|
pkgsHost = import pkgsSrc {};
|
||||||
lib = pkgsHost.lib;
|
lib = pkgsHost.lib;
|
||||||
kaniko = (import ./kaniko.nix) pkgsHost;
|
kaniko = (import ./kaniko.nix) pkgsHost;
|
||||||
|
winscp = (import ./winscp.nix) pkgsHost;
|
||||||
in
|
in
|
||||||
lib.flatten (builtins.map (pkgs: [
|
lib.flatten (builtins.map (pkgs: [
|
||||||
pkgs.rustPlatform.rust.rustc
|
pkgs.rustPlatform.rust.rustc
|
||||||
@ -25,5 +26,6 @@ in
|
|||||||
pkgs.buildPackages.stdenv.cc
|
pkgs.buildPackages.stdenv.cc
|
||||||
]) pkgsList) ++ [
|
]) pkgsList) ++ [
|
||||||
kaniko
|
kaniko
|
||||||
|
winscp
|
||||||
]
|
]
|
||||||
|
|
||||||
|
28
nix/winscp.nix
Normal file
28
nix/winscp.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
pkgs:
|
||||||
|
|
||||||
|
pkgs.stdenv.mkDerivation rec {
|
||||||
|
pname = "winscp";
|
||||||
|
version = "5.19.6";
|
||||||
|
|
||||||
|
src = pkgs.fetchzip {
|
||||||
|
url = "https://winscp.net/download/WinSCP-${version}-Portable.zip";
|
||||||
|
sha256 = "sha256-8+6JuT0b1fFQ6etaFTMSjIKvDGzmJoHAuByXiqCBzu0=";
|
||||||
|
stripRoot = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
cat > winscp <<EOF
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
|
||||||
|
WINEDEBUG=-all
|
||||||
|
${pkgs.winePackages.minimal}/bin/wine $out/opt/WinSCP.com
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/{bin,opt}
|
||||||
|
cp {WinSCP.com,WinSCP.exe} $out/opt
|
||||||
|
cp winscp $out/bin
|
||||||
|
chmod +x $out/bin/winscp
|
||||||
|
'';
|
||||||
|
}
|
4
script/dev-env-winscp.sh
Normal file
4
script/dev-env-winscp.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export AWS_ACCESS_KEY_ID=`cat /tmp/garage.s3 |cut -d' ' -f1`
|
||||||
|
export AWS_SECRET_ACCESS_KEY=`cat /tmp/garage.s3 |cut -d' ' -f2`
|
||||||
|
export AWS_DEFAULT_REGION='garage'
|
||||||
|
export WINSCP_URL="s3://${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}@127.0.0.1:4443 -certificate=* -rawsettings S3DefaultRegion=garage S3UrlStyle=1"
|
@ -116,6 +116,31 @@ if [ -z "$SKIP_DUCK" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$SKIP_WINSCP" ]; then
|
||||||
|
echo "🛠️ Testing with winscp"
|
||||||
|
source ${SCRIPT_FOLDER}/dev-env-winscp.sh
|
||||||
|
winscp <<EOF
|
||||||
|
open $WINSCP_URL
|
||||||
|
ls
|
||||||
|
mkdir eprouvette/winscp
|
||||||
|
EOF
|
||||||
|
for idx in {1..3}.{rnd,b64}; do
|
||||||
|
winscp <<EOF
|
||||||
|
open $WINSCP_URL
|
||||||
|
put Z:\\tmp\\garage.$idx eprouvette/winscp/garage.$idx.winscp
|
||||||
|
ls eprouvette/winscp/
|
||||||
|
get eprouvette/winscp/garage.$idx.winscp Z:\\tmp\\garage.$idx.dl
|
||||||
|
rm eprouvette/winscp/garage.$idx.winscp
|
||||||
|
EOF
|
||||||
|
diff /tmp/garage.$idx /tmp/garage.$idx.dl
|
||||||
|
rm /tmp/garage.$idx.dl
|
||||||
|
done
|
||||||
|
winscp <<EOF
|
||||||
|
open $WINSCP_URL
|
||||||
|
rm eprouvette/winscp
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
# Advanced testing via S3API
|
# Advanced testing via S3API
|
||||||
if [ -z "$SKIP_AWS" ]; then
|
if [ -z "$SKIP_AWS" ]; then
|
||||||
echo "🔌 Test S3API"
|
echo "🔌 Test S3API"
|
||||||
|
@ -13,6 +13,7 @@ let
|
|||||||
overlays = [ cargo2nixOverlay ];
|
overlays = [ cargo2nixOverlay ];
|
||||||
};
|
};
|
||||||
kaniko = (import ./nix/kaniko.nix) pkgs;
|
kaniko = (import ./nix/kaniko.nix) pkgs;
|
||||||
|
winscp = (import ./nix/winscp.nix) pkgs;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -80,6 +81,7 @@ function refresh_toolchain {
|
|||||||
] else [])
|
] else [])
|
||||||
++
|
++
|
||||||
(if integration then [
|
(if integration then [
|
||||||
|
winscp
|
||||||
pkgs.s3cmd
|
pkgs.s3cmd
|
||||||
pkgs.awscli2
|
pkgs.awscli2
|
||||||
pkgs.minio-client
|
pkgs.minio-client
|
||||||
|
Loading…
Reference in New Issue
Block a user