Skip to content

Commit a0db989

Browse files
fix: restore integration test discovery and sourced bootstrap flow (#26)
1 parent daa14fc commit a0db989

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace :test do
1919
ENV["PARADEDB_TEST_DSN"] ||= "postgresql://postgres:postgres@localhost:5432/postgres"
2020
ENV["PGPASSWORD"] ||= "postgres"
2121

22-
sh "bundle exec rspec spec --pattern '**/*_integration_spec.rb,**/*integration*_spec.rb'"
22+
sh "bundle exec rspec spec --pattern '**/*_integration_spec.rb'"
2323
end
2424

2525
desc "Run all tests (unit + integration)"

scripts/rbenv_bootstrap.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
#!/usr/bin/env bash
22

3-
set -euo pipefail
3+
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
4+
BOOTSTRAP_SOURCED=0
5+
set -euo pipefail
6+
else
7+
BOOTSTRAP_SOURCED=1
8+
fi
9+
10+
bootstrap_return() {
11+
local code="${1:-0}"
12+
if [[ "${BOOTSTRAP_SOURCED}" == "1" ]]; then
13+
return "${code}"
14+
fi
15+
16+
exit "${code}"
17+
}
418

519
RUBY_VERSION="4.0.0"
620
BUNDLER_VERSION="4.0.3"
@@ -13,12 +27,12 @@ if command -v ruby >/dev/null 2>&1 && ruby --version | grep -qE "ruby 4\.(0|1)";
1327
gem install "bundler:${BUNDLER_VERSION}"
1428
fi
1529
bundle install >/dev/null
16-
exit 0
30+
bootstrap_return 0
1731
fi
1832

1933
if ! command -v rbenv >/dev/null 2>&1; then
2034
echo "rbenv is not installed. Install rbenv and retry." >&2
21-
exit 1
35+
bootstrap_return 1
2236
fi
2337

2438
eval "$(rbenv init -)"

scripts/run_integration_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ export PGPASSWORD="${PASSWORD}"
3939
if [[ $# -gt 0 ]]; then
4040
bundle exec rspec "$@"
4141
else
42-
bundle exec rspec spec --pattern '**/*_integration_spec.rb,**/*integration*_spec.rb'
42+
bundle exec rspec spec --pattern '**/*_integration_spec.rb'
4343
fi

0 commit comments

Comments
 (0)