-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hack: getting the general idea worked out
- Loading branch information
frrist
committed
Mar 29, 2024
1 parent
584ae15
commit 60b7f9c
Showing
8 changed files
with
76 additions
and
9 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,46 @@ | ||
|
||
create_client() { | ||
environment=$1 | ||
|
||
case "$environment" in | ||
production) | ||
echo "Running in production environment" | ||
export BACALHAU_DIR=/home/frrist/workspace/src/github.com/bacalhau-project/bacalhau/test/clusters/production | ||
;; | ||
staging) | ||
echo "Running in staging environment" | ||
export BACALHAU_DIR=/home/frrist/workspace/src/github.com/bacalhau-project/bacalhau/test/clusters/staging | ||
;; | ||
development) | ||
echo "Running in development environment" | ||
export BACALHAU_DIR=/home/frrist/workspace/src/github.com/bacalhau-project/bacalhau/test/clusters/development | ||
;; | ||
local) | ||
echo "Running in local environment" | ||
export BACALHAU_DIR=/home/frrist/workspace/src/github.com/bacalhau-project/bacalhau/test/clusters/local | ||
# uses an existing cluster, doesn't delete anything after test runs | ||
;; | ||
spawn) | ||
echo "Spawning a new environment" | ||
# TODO create a cluster and run the tests against that. | ||
# spawn an emphermal cluster and tear it down when tests are complete | ||
;; | ||
*) | ||
echo "Unknown environment: $environment" | ||
;; | ||
esac | ||
} | ||
|
||
before_all() { | ||
ROOT=$(git rev-parse --show-toplevel) | ||
BACALHAU_BINARY=$(find $ROOT/bin -name 'bacalhau') | ||
BACALHAU=$BACALHAU_BINARY | ||
export LOG_LEVEL=WARN | ||
# export BACALHAU_NODE_SERVERAPI_HOST='localhost' | ||
export PATH=$(dirname $BACALHAU_BINARY):$PATH | ||
} | ||
|
||
after_each() { | ||
# TODO this function should remove everything from the repo execept the config file and token | ||
clean_repo | ||
} |
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,6 @@ | ||
Node: | ||
Name: "" | ||
NameProvider: puuid | ||
ClientAPI: | ||
Host: bootstrap.development.bacalhau.org | ||
Port: 1234 |
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,6 @@ | ||
Node: | ||
Name: "" | ||
NameProvider: puuid | ||
ClientAPI: | ||
Host: "0.0.0.0" | ||
Port: 1234 |
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,6 @@ | ||
Node: | ||
Name: "" | ||
NameProvider: puuid | ||
ClientAPI: | ||
Host: bootstrap.production.bacalhau.org | ||
Port: 1234 |
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,6 @@ | ||
Node: | ||
Name: "" | ||
NameProvider: puuid | ||
ClientAPI: | ||
Host: bootstrap.staging.bacalhau.org | ||
Port: 1234 |
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
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
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