-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!bin/bashtub | ||
|
||
source bin/bacalhau.sh | ||
|
||
testcase_can_get_results() { | ||
# Assuming create_node is a function that takes two arguments separated by space, not comma | ||
create_node requester,compute | ||
|
||
job_id=$(bacalhau job run --id-only $ROOT/testdata/jobs/docker-output.yaml) | ||
bacalhau get $job_id > /dev/null 2>&1 | ||
subject cat job-*/output_custom/output.txt | ||
assert_equal 0 $status | ||
assert_match "15" $(echo $stdout) | ||
assert_equal '' $stderr | ||
rm -rf job-* | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!bin/bashtub | ||
|
||
source bin/bacalhau.sh | ||
|
||
testcase_can_run_docker_hello_world() { | ||
# Assuming create_node is a function that takes two arguments separated by space, not comma | ||
create_node requester,compute | ||
|
||
# source $BACALHAU_DIR/bacalhau.run | ||
subject bacalhau job run --follow $ROOT/testdata/jobs/docker-hello.yaml | ||
assert_equal 0 $status | ||
assert_match "Hello Bacalhau!" $(echo $stdout) | ||
assert_equal '' $stderr | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!bin/bashtub | ||
|
||
source bin/bacalhau.sh | ||
|
||
testcase_can_list_nodes_and_count() { | ||
create_node requester,compute | ||
|
||
subject bacalhau node list --output json | ||
assert_equal 0 $status | ||
assert_match '1' $(echo $stdout | jq '. | length') | ||
assert_equal '' $stderr | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: A Simple Docker Job | ||
type: batch | ||
count: 1 | ||
tasks: | ||
- name: My main task | ||
engine: | ||
type: docker | ||
params: | ||
Image: ubuntu:latest | ||
Entrypoint: | ||
- /bin/bash | ||
Parameters: | ||
- -c | ||
- echo Hello Bacalhau! |