From 6465869f46ba78947c39e4252fa543e6c346c2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chastanet?= Date: Tue, 5 Dec 2023 23:58:02 +0100 Subject: [PATCH] fix UT --- src/_binaries/Git/upgradeGithubRelease.bats | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/_binaries/Git/upgradeGithubRelease.bats b/src/_binaries/Git/upgradeGithubRelease.bats index 5834ca31..cfc73fb2 100755 --- a/src/_binaries/Git/upgradeGithubRelease.bats +++ b/src/_binaries/Git/upgradeGithubRelease.bats @@ -26,8 +26,14 @@ function Git::upgradeGithubRelease::noArg { #@test assert_output --partial "ERROR - Command upgradeGithubRelease - Argument 'targetFile' should be provided at least 1 time(s)" } -function Git::upgradeGithubRelease::1Arg { #@test - run "${binDir}/upgradeGithubRelease" arg1 2>&1 +function Git::upgradeGithubRelease::1ArgNotWritable { #@test + run "${binDir}/upgradeGithubRelease" /notWritable/arg1 2>&1 + assert_failure 1 + assert_output --partial "FATAL - File /notWritable/arg1 is not writable" +} + +function Git::upgradeGithubRelease::1ArgWritable { #@test + run "${binDir}/upgradeGithubRelease" /tmp/arg1 2>&1 assert_failure 1 assert_output --partial "ERROR - Command upgradeGithubRelease - Argument 'githubUrlPattern' should be provided at least 1 time(s)" }