Merge pull request #276378 from kashw2/scaleway-cli
scaleway-cli: 2.25.0 -> 2.26.0; re-enabled tests, configured `installCheckPhase`
This commit is contained in:
@@ -2,16 +2,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "scaleway-cli";
|
||||
version = "2.25.0";
|
||||
version = "2.26.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "scaleway";
|
||||
repo = "scaleway-cli";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-wx/247ZNbdNdRiGLTfCig1JAjmXZX0aCHbOgelzMcyw=";
|
||||
sha256 = "sha256-RfXNwuynlELT7gVWjlhjaX5nKuBJM+v6eAD/JCuRyck=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-FftJsXM9sexRqBKrIeTdWh5Z0eYIK3acDNtptqqILD8=";
|
||||
vendorHash = "sha256-hBfEQtuBkU2fKoCd78dpp+I19lTOycItqjlcA6KByLY=";
|
||||
|
||||
ldflags = [
|
||||
"-w"
|
||||
@@ -23,13 +23,39 @@ buildGoModule rec {
|
||||
"-X main.BuildDate=unknown"
|
||||
];
|
||||
|
||||
# some tests require network access to scaleway's API, failing when sandboxed
|
||||
doCheck = false;
|
||||
doCheck = true;
|
||||
|
||||
# Some tests require access to scaleway's API, failing when sandboxed
|
||||
preCheck = ''
|
||||
substituteInPlace internal/core/bootstrap_test.go \
|
||||
--replace "TestInterruptError" "SkipInterruptError"
|
||||
substituteInPlace internal/e2e/errors_test.go \
|
||||
--replace "TestStandardErrors" "SkipStandardErrors"
|
||||
substituteInPlace internal/e2e/human_test.go \
|
||||
--replace "TestTestCommand" "SkipTestCommand" \
|
||||
--replace "TestHumanCreate" "SkipHumanCreate" \
|
||||
--replace "TestHumanList" "SkipHumanList" \
|
||||
--replace "TestHumanUpdate" "SkipHumanUpdate" \
|
||||
--replace "TestHumanGet" "SkipHumanGet" \
|
||||
--replace "TestHumanDelete" "SkipHumanDelete"
|
||||
substituteInPlace internal/e2e/sdk_errors_test.go \
|
||||
--replace "TestSdkStandardErrors" "SkipSdkStandardErrors"
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
$out/bin/scw --help
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Interact with Scaleway API from the command line";
|
||||
homepage = "https://github.com/scaleway/scaleway-cli";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ nickhu techknowlogick ];
|
||||
maintainers = with maintainers; [ nickhu techknowlogick kashw2 ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user