mirror of
https://github.com/mudler/luet.git
synced 2025-09-05 17:20:29 +00:00
@@ -256,7 +256,7 @@ func (a *PackageArtifact) Compress(src string, concurrency int) error {
|
|||||||
}
|
}
|
||||||
defer original.Close()
|
defer original.Close()
|
||||||
|
|
||||||
zstdFile := a.Path + ".zstd"
|
zstdFile := a.Path + ".zst"
|
||||||
bufferedReader := bufio.NewReader(original)
|
bufferedReader := bufio.NewReader(original)
|
||||||
|
|
||||||
// Open a file for writing.
|
// Open a file for writing.
|
||||||
|
@@ -15,8 +15,8 @@ testBuild() {
|
|||||||
luet build --tree "$ROOT_DIR/tests/fixtures/buildableseed" --destination $tmpdir/testbuild --compression zstd test/c@1.0 > /dev/null
|
luet build --tree "$ROOT_DIR/tests/fixtures/buildableseed" --destination $tmpdir/testbuild --compression zstd test/c@1.0 > /dev/null
|
||||||
buildst=$?
|
buildst=$?
|
||||||
assertEquals 'builds successfully' "$buildst" "0"
|
assertEquals 'builds successfully' "$buildst" "0"
|
||||||
assertTrue 'create package dep B' "[ -e '$tmpdir/testbuild/b-test-1.0.package.tar.zstd' ]"
|
assertTrue 'create package dep B' "[ -e '$tmpdir/testbuild/b-test-1.0.package.tar.zst' ]"
|
||||||
assertTrue 'create package' "[ -e '$tmpdir/testbuild/c-test-1.0.package.tar.zstd' ]"
|
assertTrue 'create package' "[ -e '$tmpdir/testbuild/c-test-1.0.package.tar.zst' ]"
|
||||||
}
|
}
|
||||||
|
|
||||||
testRepo() {
|
testRepo() {
|
||||||
@@ -36,9 +36,9 @@ testRepo() {
|
|||||||
createst=$?
|
createst=$?
|
||||||
assertEquals 'create repo successfully' "$createst" "0"
|
assertEquals 'create repo successfully' "$createst" "0"
|
||||||
assertTrue 'create repository' "[ -e '$tmpdir/testbuild/repository.yaml' ]"
|
assertTrue 'create repository' "[ -e '$tmpdir/testbuild/repository.yaml' ]"
|
||||||
assertTrue 'create named tree in zstd' "[ -e '$tmpdir/testbuild/foo.tar.zstd' ]"
|
assertTrue 'create named tree in zstd' "[ -e '$tmpdir/testbuild/foo.tar.zst' ]"
|
||||||
assertTrue 'create tree in zstd-only' "[ ! -e '$tmpdir/testbuild/foo.tar' ]"
|
assertTrue 'create tree in zstd-only' "[ ! -e '$tmpdir/testbuild/foo.tar' ]"
|
||||||
assertTrue 'create named meta in zstd' "[ -e '$tmpdir/testbuild/repository.meta.tar.zstd' ]"
|
assertTrue 'create named meta in zstd' "[ -e '$tmpdir/testbuild/repository.meta.tar.zst' ]"
|
||||||
assertTrue 'create meta in zstd-only' "[ ! -e '$tmpdir/testbuild/repository.meta.tar' ]"
|
assertTrue 'create meta in zstd-only' "[ ! -e '$tmpdir/testbuild/repository.meta.tar' ]"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,14 +93,14 @@ testInstallAgain() {
|
|||||||
assertEquals 'install test successfully' "$installst" "0"
|
assertEquals 'install test successfully' "$installst" "0"
|
||||||
assertNotContains 'contains warning' "$output" 'No packages to install'
|
assertNotContains 'contains warning' "$output" 'No packages to install'
|
||||||
assertTrue 'package installed' "[ -e '$tmpdir/testrootfs/c' ]"
|
assertTrue 'package installed' "[ -e '$tmpdir/testrootfs/c' ]"
|
||||||
assertTrue 'package in cache' "[ -e '$tmpdir/testrootfs/packages/c-test-1.0.package.tar.zstd' ]"
|
assertTrue 'package in cache' "[ -e '$tmpdir/testrootfs/packages/c-test-1.0.package.tar.zst' ]"
|
||||||
}
|
}
|
||||||
|
|
||||||
testCleanup() {
|
testCleanup() {
|
||||||
luet cleanup --config $tmpdir/luet.yaml
|
luet cleanup --config $tmpdir/luet.yaml
|
||||||
installst=$?
|
installst=$?
|
||||||
assertEquals 'install test successfully' "$installst" "0"
|
assertEquals 'install test successfully' "$installst" "0"
|
||||||
assertTrue 'package installed' "[ ! -e '$tmpdir/testrootfs/packages/c-test-1.0.package.tar.zstd' ]"
|
assertTrue 'package installed' "[ ! -e '$tmpdir/testrootfs/packages/c-test-1.0.package.tar.zst' ]"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load shUnit2.
|
# Load shUnit2.
|
||||||
|
Reference in New Issue
Block a user