BuildID: 3269
Status: OK
Image: melezhik/sparrow:ubuntu
Worker status: OK
---
Date: 28.04.2023 @ 14:19
Time elapsed: 382 sec
---
SCM:
https://github.com/ema/pets.git
Git sha: c49d88d
Git comment: planner: higher priority to directory actions
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
[35m14:18:42[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
[35m14:18:00[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
[35m14:18:51[0m :: go version go1.19.3 linux/amd64
[1;36m[task stderr][0m
[35m14:18:52[0m :: go: downloading github.com/hashicorp/logutils v1.0.0
[35m14:18:52[0m :: github.com/hashicorp/logutils
[35m14:18:52[0m :: github.com/ema/pets
[35m14:17:27[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
[35m14:17:30[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
[35m14:17:32[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
[35m14:18:56[0m :: Run tests for OS: ubuntu ...
[35m14:18:56[0m :: go version go1.19.3 linux/amd64
[35m14:18:58[0m :: === RUN TestBadUser
[35m14:18:58[0m :: --- PASS: TestBadUser (0.00s)
[35m14:18:58[0m :: === RUN TestBadGroup
[35m14:18:58[0m :: --- PASS: TestBadGroup (0.00s)
[35m14:18:58[0m :: === RUN TestShortModes
[35m14:18:58[0m :: --- PASS: TestShortModes (0.00s)
[35m14:18:58[0m :: === RUN TestOK
[35m14:18:58[0m :: --- PASS: TestOK (0.00s)
[35m14:18:58[0m :: === RUN TestFileIsValidTrue
[35m14:18:59[0m :: 2023/04/28 14:18:59 [DEBUG] gvim is a valid package name
[35m14:18:59[0m :: 2023/04/28 14:18:59 [DEBUG] same sha256 for /dev/null and /dev/null: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
[35m14:18:59[0m :: --- PASS: TestFileIsValidTrue (0.85s)
[35m14:18:59[0m :: === RUN TestFileIsValidBadPackage
[35m14:19:00[0m :: 2023/04/28 14:19:00 [ERROR] not-an-actual-package is not an available package
[35m14:19:00[0m :: --- PASS: TestFileIsValidBadPackage (0.78s)
[35m14:19:00[0m :: === RUN TestFileIsValidPrePathError
[35m14:19:01[0m :: 2023/04/28 14:19:01 [DEBUG] gvim is a valid package name
[35m14:19:01[0m :: 2023/04/28 14:19:01 [INFO] pre-update command [/bin/whatever-but-not-a-valid-path README.adoc] failed due to PathError. Ignoring for now
[35m14:19:01[0m :: --- PASS: TestFileIsValidPrePathError (0.94s)
[35m14:19:01[0m :: === RUN TestFileIsValidPathError
[35m14:19:01[0m :: 2023/04/28 14:19:01 [DEBUG] gvim is a valid package name
[35m14:19:01[0m :: 2023/04/28 14:19:01 [INFO] pre-update command [/bin/whatever-but-not-a-valid-path README.adoc] failed due to PathError. Ignoring for now
[35m14:19:02[0m :: 2023/04/28 14:19:02 [DEBUG] gvim is a valid package name
[35m14:19:02[0m :: 2023/04/28 14:19:02 [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
[35m14:19:02[0m :: --- PASS: TestFileIsValidPathError (1.65s)
[35m14:19:02[0m :: === RUN TestNeedsCopyNoSource
[35m14:19:02[0m :: --- PASS: TestNeedsCopyNoSource (0.00s)
[35m14:19:02[0m :: === RUN TestNeedsCopySourceNotThere
[35m14:19:02[0m :: 2023/04/28 14:19:02 [ERROR] cannot determine sha256 of Source file something-very-funny.lol: open something-very-funny.lol: no such file or directory
[35m14:19:02[0m :: --- PASS: TestNeedsCopySourceNotThere (0.00s)
[35m14:19:02[0m :: === RUN TestNeedsLinkNoDest
[35m14:19:02[0m :: --- PASS: TestNeedsLinkNoDest (0.00s)
[35m14:19:02[0m :: === RUN TestNeedsLinkHappyPathLINK
[35m14:19:02[0m :: --- PASS: TestNeedsLinkHappyPathLINK (0.00s)
[35m14:19:02[0m :: === RUN TestNeedsLinkHappyPathNONE
[35m14:19:02[0m :: 2023/04/28 14:19:02 [DEBUG] sample_pet/README.txt is a symlink to sample_pet/README already
[35m14:19:02[0m :: --- PASS: TestNeedsLinkHappyPathNONE (0.00s)
[35m14:19:02[0m :: === RUN TestNeedsLinkDestExists
[35m14:19:02[0m :: 2023/04/28 14:19:02 [ERROR] /etc/passwd already exists
[35m14:19:02[0m :: --- PASS: TestNeedsLinkDestExists (0.00s)
[35m14:19:02[0m :: === RUN TestNeedsLinkDestIsSymlink
[35m14:19:02[0m :: 2023/04/28 14:19:02 [ERROR] /etc/mtab is a symlink to /proc/998/mounts instead of sample_pet/vimrc
[35m14:19:02[0m :: --- PASS: TestNeedsLinkDestIsSymlink (0.00s)
[35m14:19:02[0m :: === RUN TestNeedsDirNoDirectory
[35m14:19:02[0m :: --- PASS: TestNeedsDirNoDirectory (0.00s)
[35m14:19:02[0m :: === RUN TestNeedsDirHappyPathDIR
[35m14:19:02[0m :: --- PASS: TestNeedsDirHappyPathDIR (0.00s)
[35m14:19:02[0m :: === RUN TestNeedsDirHappyPathNONE
[35m14:19:02[0m :: --- PASS: TestNeedsDirHappyPathNONE (0.00s)
[35m14:19:02[0m :: === RUN TestNeedsDirDestIsFile
[35m14:19:02[0m :: 2023/04/28 14:19:02 [ERROR] /etc/passwd already exists and it is not a directory
[35m14:19:02[0m :: --- PASS: TestNeedsDirDestIsFile (0.00s)
[35m14:19:02[0m :: === RUN TestParseFlags
[35m14:19:02[0m :: --- PASS: TestParseFlags (0.00s)
[35m14:19:02[0m :: === RUN TestGetLogFilter
[35m14:19:02[0m :: --- PASS: TestGetLogFilter (0.00s)
[35m14:19:02[0m :: === RUN TestPkgIsValid
[35m14:19:03[0m :: 2023/04/28 14:19:03 [DEBUG] coreutils is a valid package name
[35m14:19:03[0m :: --- PASS: TestPkgIsValid (0.91s)
[35m14:19:03[0m :: === RUN TestPkgIsNotValid
[35m14:19:04[0m :: 2023/04/28 14:19:04 [ERROR] obviously-this-cannot-be valid ? is not an available package
[35m14:19:04[0m :: --- PASS: TestPkgIsNotValid (0.87s)
[35m14:19:04[0m :: === RUN TestIsInstalled
[35m14:19:05[0m :: --- PASS: TestIsInstalled (0.86s)
[35m14:19:05[0m :: === RUN TestIsNotInstalled
[35m14:19:07[0m :: 2023/04/28 14:19:07 [ERROR] no 'Installed:' line in apt-cache policy this is getting ridiculous
[35m14:19:07[0m :: --- PASS: TestIsNotInstalled (1.70s)
[35m14:19:07[0m :: === RUN TestReadModelinesFileNotFound
[35m14:19:07[0m :: --- PASS: TestReadModelinesFileNotFound (0.00s)
[35m14:19:07[0m :: === RUN TestReadModelinesZero
[35m14:19:07[0m :: --- PASS: TestReadModelinesZero (0.00s)
[35m14:19:07[0m :: === RUN TestReadModelinesNonZero
[35m14:19:07[0m :: --- PASS: TestReadModelinesNonZero (0.00s)
[35m14:19:07[0m :: === RUN TestParseModelineErr
[35m14:19:07[0m :: --- PASS: TestParseModelineErr (0.00s)
[35m14:19:07[0m :: === RUN TestParseModelineBadKeyword
[35m14:19:07[0m :: --- PASS: TestParseModelineBadKeyword (0.00s)
[35m14:19:07[0m :: === RUN TestParseModelineOKDestfile
[35m14:19:07[0m :: --- PASS: TestParseModelineOKDestfile (0.00s)
[35m14:19:07[0m :: === RUN TestParseModelineOKSymlink
[35m14:19:07[0m :: --- PASS: TestParseModelineOKSymlink (0.00s)
[35m14:19:07[0m :: === RUN TestParseModelineOKPackage
[35m14:19:07[0m :: --- PASS: TestParseModelineOKPackage (0.00s)
[35m14:19:07[0m :: === RUN TestPkgsToInstall
[35m14:19:07[0m :: 2023/04/28 14:19:07 [DEBUG] binutils already installed
[35m14:19:08[0m :: 2023/04/28 14:19:08 [DEBUG] binutils already installed
[35m14:19:09[0m :: 2023/04/28 14:19:09 [INFO] abiword not installed
[35m14:19:09[0m :: --- PASS: TestPkgsToInstall (2.64s)
[35m14:19:09[0m :: === RUN TestFileToCopy
[35m14:19:09[0m :: 2023/04/28 14:19:09 [DEBUG] same sha256 for sample_pet/ssh/sshd_config and sample_pet/ssh/sshd_config: ff4f8ceaae2ea2432f5e3fad5d16ba4331fa0faf8a98ad8a82f46ea3298152a1
[35m14:19:09[0m :: 2023/04/28 14:19:09 [DEBUG] sha256[sample_pet/ssh/sshd_config]=ff4f8ceaae2ea2432f5e3fad5d16ba4331fa0faf8a98ad8a82f46ea3298152a1 != sha256[sample_pet/ssh/user_ssh_config]=3538b9a926a328a14aaa7428c138aad2e7fcb321090045f3a5ca225351c4537b
[35m14:19:09[0m :: --- PASS: TestFileToCopy (0.00s)
[35m14:19:09[0m :: === RUN TestChmod
[35m14:19:09[0m :: 2023/04/28 14:19:09 [INFO] /dev/null is Dcrw-rw-rw- instead of -rw-r--r--
[35m14:19:09[0m :: 2023/04/28 14:19:09 [DEBUG] /etc/passwd is -rw-r--r-- already
[35m14:19:09[0m :: --- PASS: TestChmod (0.00s)
[35m14:19:09[0m :: === RUN TestChown
[35m14:19:09[0m :: 2023/04/28 14:19:09 [DEBUG] /etc/passwd is owned by 0:0 already
[35m14:19:09[0m :: 2023/04/28 14:19:09 [INFO] /etc/passwd is owned by uid 0 instead of nobody
[35m14:19:09[0m :: --- PASS: TestChown (0.00s)
[35m14:19:09[0m :: === RUN TestLn
[35m14:19:09[0m :: 2023/04/28 14:19:09 [ERROR] /etc/passwd already exists
[35m14:19:09[0m :: --- PASS: TestLn (0.00s)
[35m14:19:09[0m :: === RUN TestMkdir
[35m14:19:09[0m :: --- PASS: TestMkdir (0.00s)
[35m14:19:09[0m :: PASS
[35m14:19:09[0m :: ok github.com/ema/pets 11.222s