From cef857340f575a78099fd175512f3557830f0d77 Mon Sep 17 00:00:00 2001 From: merakor Date: Mon, 14 Nov 2022 19:00:39 +0000 Subject: spec: fix vcs tests FossilOrigin-Name: dd39690464691385595f435f719f9b9d0d88ff9b7e42b7c54168637bc1889a34 --- spec/01_lib_spec.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/01_lib_spec.sh b/spec/01_lib_spec.sh index e505f21..b7d83f3 100644 --- a/spec/01_lib_spec.sh +++ b/spec/01_lib_spec.sh @@ -155,8 +155,9 @@ Describe 'CPT Library' check_internet_connection() { ! curl -L git.carbslinux.org >/dev/null 2>&1 ;} Skip if "no internet connection" check_internet_connection Describe 'pkg_vcs_clone_git()' - setup() { mkdir test_repository && cd test_repository || return ;} - cleanup() { cd .. && rm -rf test_repository ;} + tmpfos=$$ + setup() { mkdir "/tmp/test_repository.$tmpfos" && cd "/tmp/test_repository.$tmpfos" || return ;} + cleanup() { cd /tmp && rm -rf "test_repository.$tmpfos" ;} check_version() { [ "$1" = "$(sed -n '/^version=/s/.*=//p' configure)" ] ;} BeforeEach setup AfterEach cleanup -- cgit v1.2.3