diff --git a/buildkite/pipelines/bacalhau-golang.yaml b/buildkite/pipelines/bacalhau-golang.yaml index 18b5914207..11a2bfa595 100644 --- a/buildkite/pipelines/bacalhau-golang.yaml +++ b/buildkite/pipelines/bacalhau-golang.yaml @@ -61,6 +61,12 @@ steps: agents: queue: "buildkite-hosted-linux-large" + - label: ":testengine: Bash Tub Test" + command: "./buildkite/scripts/bash_tub_test.sh" + key: "bash-tub-test" + agents: + queue: "buildkite-hosted-linux-large" + - wait: ~ - label: ":docker: Build & Publish Bacalhau Image" diff --git a/buildkite/scripts/bash_tub_test.sh b/buildkite/scripts/bash_tub_test.sh new file mode 100644 index 0000000000..3e16b914a5 --- /dev/null +++ b/buildkite/scripts/bash_tub_test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +build_bacalhau() { + make build +} + + +bash_test() { + make bash-test +} + + +main () { + build_bacalhau + bash_test +} + +main + + diff --git a/pkg/config/types/default_config.go b/pkg/config/types/default_config.go index a9ae9d7235..fe6accbecf 100644 --- a/pkg/config/types/default_config.go +++ b/pkg/config/types/default_config.go @@ -29,7 +29,7 @@ var Default = Bacalhau{ }, NameProvider: "puuid", Orchestrator: Orchestrator{ - Enabled: false, + Enabled: true, Host: "0.0.0.0", Port: 4222, NodeManager: NodeManager{ diff --git a/test/bin/bacalhau.sh b/test/bin/bacalhau.sh index f056f6c6b2..32e1f4118a 100644 --- a/test/bin/bacalhau.sh +++ b/test/bin/bacalhau.sh @@ -17,7 +17,17 @@ clean_repo() { create_node() { TYPE=$1 shift 1 - $BACALHAU serve --node-type=$TYPE $@ 1>$BACALHAU_DIR/out.log 2>$BACALHAU_DIR/err.log & + + # Check if TYPE contains a comma + if [[ "$TYPE" == *","* ]]; then + # Split the types and run the command with both + IFS=',' read -ra TYPES <<< "$TYPE" + $BACALHAU serve --"${TYPES[0]}" --"${TYPES[1]}" "$@" 1>$BACALHAU_DIR/out.log 2>$BACALHAU_DIR/err.log & + else + # Run the command with the single type + $BACALHAU serve --"$TYPE" "$@" 1>$BACALHAU_DIR/out.log 2>$BACALHAU_DIR/err.log & + fi + NODE_PID=$! RUNNING_NODES+=($NODE_PID) { diff --git a/test/config_with_defaults.sh b/test/config_with_defaults.sh old mode 100644 new mode 100755 diff --git a/test/config_with_file.sh b/test/config_with_file.sh old mode 100644 new mode 100755 diff --git a/test/config_with_file_override.sh b/test/config_with_file_override.sh old mode 100644 new mode 100755 diff --git a/test/config_with_file_override_and_flag.sh b/test/config_with_file_override_and_flag.sh old mode 100644 new mode 100755 diff --git a/test/config_with_file_override_and_flag_and_config_flag.sh b/test/config_with_file_override_and_flag_and_config_flag.sh old mode 100644 new mode 100755 index 96faf91910..0ded9c79f2 --- a/test/config_with_file_override_and_flag_and_config_flag.sh +++ b/test/config_with_file_override_and_flag_and_config_flag.sh @@ -3,7 +3,7 @@ source bin/bacalhau.sh testcase_config_with_override_config_file_with_api_config_flag_and_dedicated_flag() { - start_bacalhau_serve_with_config -c $ROOT/testdata/config/base.yaml -c $ROOT/testdata/config/override.yaml --web-ui=false --config webui.enabled=true + start_bacalhau_serve_with_config -c $ROOT/testdata/config/base.yaml -c $ROOT/testdata/config/override.yaml --config webui.enabled=true subject curl -s http://localhost:1234/api/v1/agent/config assert_equal 0 $status > /dev/null diff --git a/test/errors.sh b/test/errors.sh index 96bb7c44e4..4af68435e1 100755 --- a/test/errors.sh +++ b/test/errors.sh @@ -3,8 +3,8 @@ source bin/bacalhau.sh testcase_ranking_failures_are_printed() { - create_node compute,requester + create_node compute,orchestrator subject bacalhau job run $ROOT/testdata/jobs/custom-task-type.yaml - assert_match 'does not support flibble' $(echo $stderr) + assert_match 'does not support flibble' $(echo $stdout) } diff --git a/test/get-results.sh b/test/get-results.sh old mode 100644 new mode 100755 index 7f159a61c0..64231b6a8e --- a/test/get-results.sh +++ b/test/get-results.sh @@ -4,7 +4,7 @@ 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 + create_node orchestrator,compute job_id=$(bacalhau job run --id-only $ROOT/testdata/jobs/docker-output.yaml) bacalhau job get $job_id > /dev/null 2>&1 diff --git a/test/hello-world-docker-v2.sh b/test/hello-world-docker-v2.sh old mode 100644 new mode 100755 index 32badaeda9..114175a0e7 --- a/test/hello-world-docker-v2.sh +++ b/test/hello-world-docker-v2.sh @@ -4,7 +4,7 @@ source bin/bacalhau.sh testcase_can_run_docker_hello_world() { # Assuming create_node is a function that takes two arguments separated by comma, not space - create_node requester,compute + create_node orchestrator,compute subject bacalhau job run --follow $ROOT/testdata/jobs/docker-hello.yaml assert_equal 0 $status diff --git a/test/labels.sh b/test/labels.sh index e8ca0c1c89..75c239689e 100755 --- a/test/labels.sh +++ b/test/labels.sh @@ -23,9 +23,9 @@ run_test() { } testcase_receive_labels_about_requester_node() { - run_test requester + run_test orchestrator } testcase_receive_labels_about_compute_node() { - run_test requester,compute + run_test orchestrator,compute } diff --git a/test/list_nodes.sh b/test/list_nodes.sh old mode 100644 new mode 100755 index 407fda62c5..f450506224 --- a/test/list_nodes.sh +++ b/test/list_nodes.sh @@ -3,7 +3,7 @@ source bin/bacalhau.sh testcase_can_list_nodes_and_count() { - create_node requester,compute + create_node orchestrator,compute subject bacalhau node list --output json assert_equal 0 $status diff --git a/test/logs.sh b/test/logs.sh index 8cf617fda4..e44ffc1e86 100755 --- a/test/logs.sh +++ b/test/logs.sh @@ -3,7 +3,7 @@ source bin/bacalhau.sh testcase_can_follow_job_logs() { - create_node requester,compute + create_node orchestrator,compute subject bacalhau job run --follow $ROOT/testdata/jobs/wasm.yaml assert_equal 0 $status diff --git a/test/node_auth.sh b/test/node_auth.sh index 77e9fcfd93..207a297dc0 100755 --- a/test/node_auth.sh +++ b/test/node_auth.sh @@ -4,7 +4,7 @@ source bin/bacalhau.sh testcase_node_can_connect_without_token() { subject bacalhau config set node.network.type nats - create_node requester + create_node orchestrator create_node compute # If this returns successfully, the node started and authenticated. @@ -15,7 +15,7 @@ testcase_preconfigured_token_not_printed() { subject bacalhau config set node.network.authsecret kerfuffle assert_equal 0 $status - create_node requester + create_node orchestrator assert_equal 0 $status # check stdout @@ -33,7 +33,7 @@ testcase_node_connects_with_preconfigured_token() { subject bacalhau config set node.network.type nats subject bacalhau config set node.network.authsecret kerfuffle assert_match 0 $status - create_node requester + create_node orchestrator subject bacalhau config set node.network.authsecret kerfuffle subject bacalhau config set node.network.type nats @@ -45,7 +45,7 @@ testcase_node_connects_with_url_embedded_token() { subject bacalhau config set node.network.type nats subject bacalhau config set node.network.authsecret kerfuffle assert_match 0 $status - create_node requester + create_node orchestrator # remove the token from the config @@ -63,7 +63,7 @@ testcase_node_cannot_connect_with_wrong_token() { subject bacalhau config set node.network.type nats subject bacalhau config set node.network.authsecret kerfuffle assert_match 0 $status - create_node requester + create_node orchestrator subject bacalhau config set node.network.type nats subject bacalhau config set node.network.authsecret kerfalafel diff --git a/test/secret_auth.sh b/test/secret_auth.sh index 56306dbe03..96f1af030a 100755 --- a/test/secret_auth.sh +++ b/test/secret_auth.sh @@ -11,7 +11,7 @@ setup() { subject 'bacalhau config list | grep auth.methods' assert_match 'shared_secret' $stdout - create_node requester + create_node orchestrator subject ls $BACALHAU_DIR/tokens.json assert_not_equal 0 $status