Skip to content

Commit

Permalink
Add more Rust and Suibase versioning consistency tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mario4tier committed Oct 17, 2024
1 parent bb05d4b commit ebab53f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/common/__globals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export SUIBASE_VERSION="0.1.7"

# Suibase does not work with version below these.
export MIN_SUI_VERSION="sui 0.27.0"
export MIN_RUST_VERSION="rustc 1.65.0"
export MIN_RUST_VERSION="rustc 1.81.0"

# Mandatory command line:
# $1 : Should be the "$0" of the caller script.
Expand Down
8 changes: 8 additions & 0 deletions scripts/tests/010_unit_test_common/test_globals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ tests() {
# apart from the first phase.
sleep 1
test_file_newer_than_phase_2
test_versions_consistency
}

test_versions_consistency() {
# Check that the hard coded version is mention in the CHANGELOG.md
if ! grep -q "$SUIBASE_VERSION" "$SUIBASE_DIR/CHANGELOG.md"; then
fail "Seems that $SUIBASE_VERSION version is *not* documented in CHANGELOG.md"
fi
}

test_color() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# shellcheck source=SCRIPTDIR/../../tests/030_rust_cargo_tests/__test_common.sh
source "$HOME/suibase/scripts/tests/030_rust_cargo_tests/__test_common.sh" "$HOME/suibase/rust/suibase/common"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

# shellcheck source=SCRIPTDIR/../../tests/030_rust_cargo_tests/__test_common.sh
source "$HOME/suibase/scripts/tests/030_rust_cargo_tests/__test_common.sh" "$HOME/suibase/rust/demo-app"
source "$HOME/suibase/scripts/tests/030_rust_cargo_tests/__test_common.sh" "$HOME/suibase/rust/suibase/suibase-daemon"

0 comments on commit ebab53f

Please sign in to comment.