-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Basic Bashtub tests #3669
Add Basic Bashtub tests #3669
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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-* | ||
} |
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a correct comment? |
||
create_node requester,compute | ||
|
||
# source $BACALHAU_DIR/bacalhau.run | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove commented out code |
||
subject bacalhau job run --follow $ROOT/testdata/jobs/docker-hello.yaml | ||
assert_equal 0 $status | ||
assert_match "Hello Bacalhau!" $(echo $stdout) | ||
assert_equal '' $stderr | ||
} |
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') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The call to |
||
assert_equal '' $stderr | ||
} |
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit naughty, if I have downloaded any job results separate to testing it will delete these also. Can't we work out the job folder from the job id?