This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/tests/tasks.bats
Sam Alba cbd141d019
Merge pull request #1278 from aluzzardi/exec-mount-cache-fix-test
engine.#Exec: fix mount cache flaky test
2021-12-21 09:37:13 -08:00

77 lines
1.7 KiB
Bash

setup() {
load 'helpers'
common_setup
}
@test "task: #Pull" {
cd "$TESTDIR"/tasks/pull
"$DAGGER" --europa up ./pull.cue
}
@test "task: #Pull with auth" {
cd "$TESTDIR"/tasks/pull
"$DAGGER" --europa up ./pull_auth.cue
}
@test "task: #Push" {
cd "$TESTDIR"/tasks/push
"$DAGGER" --europa up ./push.cue
}
@test "task: #ReadFile" {
cd "$TESTDIR"/tasks/readfile
"$DAGGER" --europa up
}
@test "task: #WriteFile" {
cd "$TESTDIR"/tasks/writefile
"$DAGGER" --europa up ./writefile.cue
}
@test "task: #WriteFile failure: different contents" {
cd "$TESTDIR"/tasks/writefile
run "$DAGGER" --europa up ./writefile_failure_diff_contents.cue
assert_failure
}
@test "task: #Exec" {
cd "$TESTDIR"/tasks/exec
"$DAGGER" --europa up ./args.cue
"$DAGGER" --europa up ./env.cue
"$DAGGER" --europa up ./hosts.cue
"$DAGGER" --europa up ./mount_cache.cue
"$DAGGER" --europa up ./mount_fs.cue
TESTSECRET="hello world" "$DAGGER" --europa up ./mount_secret.cue
"$DAGGER" --europa up ./mount_tmp.cue
"$DAGGER" --europa up ./mount_service.cue
"$DAGGER" --europa up ./user.cue
"$DAGGER" --europa up ./workdir.cue
}
@test "task: #Copy" {
cd "$TESTDIR"/tasks/copy
"$DAGGER" --europa up ./copy_exec.cue
"$DAGGER" --europa up ./copy_file.cue
run "$DAGGER" --europa up ./copy_exec_invalid.cue
assert_failure
}
@test "task: #Mkdir" {
# Make directory
cd "$TESTDIR"/tasks/mkdir
"$DAGGER" --europa up ./mkdir.cue
# Create parents
cd "$TESTDIR"/tasks/mkdir
"$DAGGER" --europa up ./mkdir_parents.cue
# Disable parents creation
cd "$TESTDIR"/tasks/mkdir
run "$DAGGER" --europa up ./mkdir_failure_disable_parents.cue
assert_failure
}