BuildID: 3326
Status: FAIL
Image: melezhik/sparrow:archlinux
Worker status: OK
---
Date: 16.05.2023 @ 06:03
Time elapsed: 419 sec
---
SCM:
https://github.com/ema/pets.git
Git sha: 1c808aa
Git comment: symlink: create destination directory
image:
- melezhik/sparrow:alpine
- melezhik/sparrow:debian
- melezhik/sparrow:ubuntu
- melezhik/sparrow:archlinux
tasks:
-
name: go_test
language: Bash
code: |
set -e
echo "Run tests for OS: $os ..."
if test "$os" = "ubuntu" || test "$os" = "debian" || test "$os" = "arch" || test "$os" = "archlinux"; then
export PATH=/usr/local/go/bin:$PATH
fi
go version
cd source
go test -v
default: true
depends:
-
name: go_build
-
name: go_build
language: Bash
code: |
set -e
if test "$os" = "ubuntu" || test "$os" = "debian" || test "$os" = "arch" || test "$os" = "archlinux"; then
export PATH=/usr/local/go/bin:$PATH
fi
go version
cd source
go build -v
depends:
-
name: install-go
-
name: install-go
language: Bash
code: |
if test $os = "alpine"; then
sudo apk add go \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
else
sudo rm -rf /usr/local/go
curl -sfL https://go.dev/dl/go1.19.3.linux-amd64.tar.gz -o ~/go1.19.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf ~/go*.linux-amd64.tar.gz
fi
[35m06:02:59[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
[1;36m[task run: task.bash - tasks/install-go][0m
[1;36m[dump code: task.bash][0m
[1] if test $os = "alpine"; then
[2] sudo apk add go \
[3] --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
[4] else
[5] sudo rm -rf /usr/local/go
[6] curl -sfL https://go.dev/dl/go1.19.3.linux-amd64.tar.gz -o ~/go1.19.3.linux-amd64.tar.gz
[7] sudo tar -C /usr/local -xzf ~/go*.linux-amd64.tar.gz
[8] fi
[9]
[1;36m[task stdout][0m
[35m06:02:24[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
[1;36m[task run: task.bash - tasks/go_build][0m
[1;36m[dump code: task.bash][0m
[1] set -e
[2] if test "$os" = "ubuntu" || test "$os" = "debian" || test "$os" = "arch" || test "$os" = "archlinux"; then
[3] export PATH=/usr/local/go/bin:$PATH
[4] fi
[5] go version
[6] cd source
[7] go build -v
[8]
[1;36m[task stdout][0m
[35m06:03:06[0m :: go version go1.19.3 linux/amd64
[1;36m[task stderr][0m
[35m06:03:06[0m :: go: downloading github.com/hashicorp/logutils v1.0.0
[35m06:03:06[0m :: github.com/hashicorp/logutils
[35m06:03:06[0m :: github.com/ema/pets
[35m06:01:57[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
source directory does not yet exist, download source archive from storage
[35m06:02:00[0m :: [repository] - installing pack-unpack, version 0.000001
[1;36m[task run: task.bash - unpack source archive][0m
[1;36m[dump code: task.bash][0m
[1] set -e
[2]
[3] file=$(config file)
[4] dir=$(config dir)
[5]
[6] echo "tar -xzf $file "
[7]
[8] tar -xzf $file
[9]
[10] if test $dir; then
[11] ls -l $dir
[12] fi
[13]
[14]
[1;36m[task stdout][0m
[35m06:02:02[0m :: tar -xzf source.tar.gz
[1;36m[task run: task.bash - tasks/go_test][0m
[1;36m[dump code: task.bash][0m
[1] set -e
[2] echo "Run tests for OS: $os ..."
[3] if test "$os" = "ubuntu" || test "$os" = "debian" || test "$os" = "arch" || test "$os" = "archlinux"; then
[4] export PATH=/usr/local/go/bin:$PATH
[5] fi
[6] go version
[7] cd source
[8] go test -v
[9]
[1;36m[task stdout][0m
[35m06:03:11[0m :: Run tests for OS: arch ...
[35m06:03:11[0m :: go version go1.19.3 linux/amd64
[35m06:03:13[0m :: === RUN TestBadUser
[35m06:03:13[0m :: --- PASS: TestBadUser (0.00s)
[35m06:03:13[0m :: === RUN TestBadGroup
[35m06:03:13[0m :: --- PASS: TestBadGroup (0.00s)
[35m06:03:13[0m :: === RUN TestShortModes
[35m06:03:13[0m :: --- PASS: TestShortModes (0.00s)
[35m06:03:13[0m :: === RUN TestOK
[35m06:03:13[0m :: --- PASS: TestOK (0.00s)
[35m06:03:13[0m :: === RUN TestFileIsValidTrue
[35m06:03:13[0m :: 2023/05/16 06:03:13 [DEBUG] gvim is a valid package name
[35m06:03:13[0m :: 2023/05/16 06:03:13 [DEBUG] same sha256 for /dev/null and /dev/null: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
[35m06:03:13[0m :: --- PASS: TestFileIsValidTrue (0.30s)
[35m06:03:13[0m :: === RUN TestFileIsValidBadPackage
[35m06:03:13[0m :: 2023/05/16 06:03:13 [ERROR] pkgInfoPolicy() command /usr/sbin/pacman -Si not-an-actual-package failed: exit status 1
[35m06:03:13[0m :: 2023/05/16 06:03:13 [DEBUG] not-an-actual-package is a valid package name
[35m06:03:13[0m :: 2023/05/16 06:03:13 [DEBUG] same sha256 for /dev/null and /dev/null: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
[35m06:03:13[0m :: util.go:79: true != false
[35m06:03:13[0m :: --- FAIL: TestFileIsValidBadPackage (0.27s)
[35m06:03:13[0m :: === RUN TestFileIsValidPrePathError
[35m06:03:13[0m :: 2023/05/16 06:03:13 [DEBUG] gvim is a valid package name
[35m06:03:13[0m :: 2023/05/16 06:03:13 [INFO] pre-update command [/bin/whatever-but-not-a-valid-path README.adoc] failed due to PathError. Ignoring for now
[35m06:03:13[0m :: --- PASS: TestFileIsValidPrePathError (0.29s)
[35m06:03:13[0m :: === RUN TestFileIsValidPathError
[35m06:03:14[0m :: 2023/05/16 06:03:14 [DEBUG] gvim is a valid package name
[35m06:03:14[0m :: 2023/05/16 06:03:14 [INFO] pre-update command [/bin/whatever-but-not-a-valid-path README.adoc] failed due to PathError. Ignoring for now
[35m06:03:14[0m :: 2023/05/16 06:03:14 [DEBUG] gvim is a valid package name
[35m06:03:14[0m :: 2023/05/16 06:03:14 [ERROR] pre-update command [/bin/whatever-but-not-a-valid-path README.adoc README.adoc]: fork/exec /bin/whatever-but-not-a-valid-path: no such file or directory
[35m06:03:14[0m :: --- PASS: TestFileIsValidPathError (0.57s)
[35m06:03:14[0m :: === RUN TestNeedsCopyNoSource
[35m06:03:14[0m :: --- PASS: TestNeedsCopyNoSource (0.00s)
[35m06:03:14[0m :: === RUN TestNeedsCopySourceNotThere
[35m06:03:14[0m :: 2023/05/16 06:03:14 [ERROR] cannot determine sha256 of Source file something-very-funny.lol: open something-very-funny.lol: no such file or directory
[35m06:03:14[0m :: --- PASS: TestNeedsCopySourceNotThere (0.00s)
[35m06:03:14[0m :: === RUN TestNeedsLinkNoDest
[35m06:03:14[0m :: --- PASS: TestNeedsLinkNoDest (0.00s)
[35m06:03:14[0m :: === RUN TestNeedsLinkHappyPathLINK
[35m06:03:14[0m :: --- PASS: TestNeedsLinkHappyPathLINK (0.00s)
[35m06:03:14[0m :: === RUN TestNeedsLinkHappyPathNONE
[35m06:03:14[0m :: 2023/05/16 06:03:14 [DEBUG] sample_pet/README.txt is a symlink to sample_pet/README already
[35m06:03:14[0m :: --- PASS: TestNeedsLinkHappyPathNONE (0.00s)
[35m06:03:14[0m :: === RUN TestNeedsLinkDestExists
[35m06:03:14[0m :: 2023/05/16 06:03:14 [ERROR] /etc/passwd already exists
[35m06:03:14[0m :: --- PASS: TestNeedsLinkDestExists (0.00s)
[35m06:03:14[0m :: === RUN TestNeedsLinkDestIsSymlink
[35m06:03:14[0m :: 2023/05/16 06:03:14 [ERROR] /etc/mtab is a symlink to /proc/1017/mounts instead of sample_pet/vimrc
[35m06:03:14[0m :: --- PASS: TestNeedsLinkDestIsSymlink (0.00s)
[35m06:03:14[0m :: === RUN TestNeedsDirNoDirectory
[35m06:03:14[0m :: --- PASS: TestNeedsDirNoDirectory (0.00s)
[35m06:03:14[0m :: === RUN TestNeedsDirHappyPathDIR
[35m06:03:14[0m :: --- PASS: TestNeedsDirHappyPathDIR (0.00s)
[35m06:03:14[0m :: === RUN TestNeedsDirHappyPathNONE
[35m06:03:14[0m :: --- PASS: TestNeedsDirHappyPathNONE (0.00s)
[35m06:03:14[0m :: === RUN TestNeedsDirDestIsFile
[35m06:03:14[0m :: 2023/05/16 06:03:14 [ERROR] /etc/passwd already exists and it is not a directory
[35m06:03:14[0m :: --- PASS: TestNeedsDirDestIsFile (0.00s)
[35m06:03:14[0m :: === RUN TestParseFlags
[35m06:03:14[0m :: --- PASS: TestParseFlags (0.00s)
[35m06:03:14[0m :: === RUN TestGetLogFilter
[35m06:03:14[0m :: --- PASS: TestGetLogFilter (0.00s)
[35m06:03:14[0m :: === RUN TestPkgIsValid
[35m06:03:14[0m :: 2023/05/16 06:03:14 [DEBUG] coreutils is a valid package name
[35m06:03:14[0m :: --- PASS: TestPkgIsValid (0.28s)
[35m06:03:14[0m :: === RUN TestPkgIsNotValid
[35m06:03:15[0m :: 2023/05/16 06:03:15 [ERROR] pkgInfoPolicy() command /usr/sbin/pacman -Si obviously-this-cannot-be valid ? failed: exit status 1
[35m06:03:15[0m :: 2023/05/16 06:03:15 [DEBUG] obviously-this-cannot-be valid ? is a valid package name
[35m06:03:15[0m :: util.go:79: true != false
[35m06:03:15[0m :: --- FAIL: TestPkgIsNotValid (0.27s)
[35m06:03:15[0m :: === RUN TestIsInstalled
[35m06:03:15[0m :: --- PASS: TestIsInstalled (0.01s)
[35m06:03:15[0m :: === RUN TestIsNotInstalled
[35m06:03:15[0m :: --- PASS: TestIsNotInstalled (0.03s)
[35m06:03:15[0m :: === RUN TestReadModelinesFileNotFound
[35m06:03:15[0m :: --- PASS: TestReadModelinesFileNotFound (0.00s)
[35m06:03:15[0m :: === RUN TestReadModelinesZero
[35m06:03:15[0m :: --- PASS: TestReadModelinesZero (0.00s)
[35m06:03:15[0m :: === RUN TestReadModelinesNonZero
[35m06:03:15[0m :: --- PASS: TestReadModelinesNonZero (0.00s)
[35m06:03:15[0m :: === RUN TestParseModelineErr
[35m06:03:15[0m :: --- PASS: TestParseModelineErr (0.00s)
[35m06:03:15[0m :: === RUN TestParseModelineBadKeyword
[35m06:03:15[0m :: --- PASS: TestParseModelineBadKeyword (0.00s)
[35m06:03:15[0m :: === RUN TestParseModelineOKDestfile
[35m06:03:15[0m :: --- PASS: TestParseModelineOKDestfile (0.00s)
[35m06:03:15[0m :: === RUN TestParseModelineOKSymlink
[35m06:03:15[0m :: --- PASS: TestParseModelineOKSymlink (0.00s)
[35m06:03:15[0m :: === RUN TestParseModelineOKPackage
[35m06:03:15[0m :: --- PASS: TestParseModelineOKPackage (0.00s)
[35m06:03:15[0m :: === RUN TestPkgsToInstall
[35m06:03:15[0m :: 2023/05/16 06:03:15 [DEBUG] binutils already installed
[35m06:03:15[0m :: 2023/05/16 06:03:15 [DEBUG] binutils already installed
[35m06:03:15[0m :: 2023/05/16 06:03:15 [INFO] abiword not installed
[35m06:03:15[0m :: --- PASS: TestPkgsToInstall (0.06s)
[35m06:03:15[0m :: === RUN TestFileToCopy
[35m06:03:15[0m :: 2023/05/16 06:03:15 [DEBUG] same sha256 for sample_pet/ssh/sshd_config and sample_pet/ssh/sshd_config: ff4f8ceaae2ea2432f5e3fad5d16ba4331fa0faf8a98ad8a82f46ea3298152a1
[35m06:03:15[0m :: 2023/05/16 06:03:15 [DEBUG] sha256[sample_pet/ssh/sshd_config]=ff4f8ceaae2ea2432f5e3fad5d16ba4331fa0faf8a98ad8a82f46ea3298152a1 != sha256[sample_pet/ssh/user_ssh_config]=3538b9a926a328a14aaa7428c138aad2e7fcb321090045f3a5ca225351c4537b
[35m06:03:15[0m :: --- PASS: TestFileToCopy (0.00s)
[35m06:03:15[0m :: === RUN TestChmod
[35m06:03:15[0m :: 2023/05/16 06:03:15 [INFO] /dev/null is Dcrw-rw-rw- instead of -rw-r--r--
[35m06:03:15[0m :: 2023/05/16 06:03:15 [DEBUG] /etc/passwd is -rw-r--r-- already
[35m06:03:15[0m :: --- PASS: TestChmod (0.00s)
[35m06:03:15[0m :: === RUN TestChown
[35m06:03:15[0m :: 2023/05/16 06:03:15 [DEBUG] /etc/passwd is owned by 0:0 already
[35m06:03:15[0m :: 2023/05/16 06:03:15 [INFO] /etc/passwd is owned by uid 0 instead of nobody
[35m06:03:15[0m :: --- PASS: TestChown (0.00s)
[35m06:03:15[0m :: === RUN TestLn
[35m06:03:15[0m :: 2023/05/16 06:03:15 [ERROR] /etc/passwd already exists
[35m06:03:15[0m :: --- PASS: TestLn (0.00s)
[35m06:03:15[0m :: === RUN TestMkdir
[35m06:03:15[0m :: --- PASS: TestMkdir (0.00s)
[35m06:03:15[0m :: FAIL
[35m06:03:15[0m :: exit status 1
[35m06:03:15[0m :: FAIL github.com/ema/pets 2.086s
[35m06:03:15[0m :: task exit status: 1
[35m06:03:15[0m :: task tasks/go_test FAILED
The spawned command 'docker exec -i sparrow-worker sh -l /var/.sparrowdo/env/go_test/.sparrowdo/sparrowrun.sh' exited unsuccessfully (exit code: 1, signal: 0)
in block <unit> at /home/sparrow/.rakubrew/versions/moar-2022.12/share/perl6/site/resources/D89191B85489D8D1AA2CA29B23BB54732926E4C8 line 13
in sub MAIN at /home/sparrow/.rakubrew/versions/moar-2022.12/share/perl6/site/bin/sparrowdo line 3
in block <unit> at /home/sparrow/.rakubrew/versions/moar-2022.12/share/perl6/site/bin/sparrowdo line 1