Skip to content

Commit 5817670

Browse files
cgrindelclaude
andcommitted
refactor: remove unnecessary echo output from tests
Remove all echo statements to STDOUT from test files to keep test output clean. Tests should only output on failure. Changes: - Remove DEBUG echo statements from integration tests - Remove TEST/PASS progress messages from all tests - Remove summary "All tests passed!" messages - Keep echo statements redirected to stderr or files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent 2aba6f9 commit 5817670

File tree

4 files changed

+0
-43
lines changed

4 files changed

+0
-43
lines changed

tools/generate_excluded_gems/generate_excluded_gems_integration_test.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ trap cleanup_temp_dirs EXIT
5151

5252
# Test: Buildozer updates MODULE.bazel correctly
5353
test_buildozer_updates() {
54-
echo "TEST: Buildozer updates MODULE.bazel correctly"
5554

5655
local temp_dir
5756
temp_dir="$(mktemp -d)"
@@ -105,12 +104,10 @@ EOF
105104
assert_match 'gemfile = "//:Gemfile"' "${module_content}" \
106105
"MODULE.bazel should preserve existing gemfile"
107106

108-
echo "PASS: Buildozer updates MODULE.bazel correctly"
109107
}
110108

111109
# Test: Buildozer updates only target bundle by name
112110
test_buildozer_name_filtering() {
113-
echo "TEST: Buildozer updates only target bundle by name"
114111

115112
local temp_dir
116113
temp_dir="$(mktemp -d)"
@@ -170,12 +167,9 @@ EOF
170167
fail "First bundle_fetch should still exist"
171168
fi
172169

173-
echo "PASS: Buildozer updates only target bundle by name"
174170
}
175171

176172
# Run all tests
177173
test_buildozer_updates
178174
test_buildozer_name_filtering
179175

180-
echo ""
181-
echo "All integration tests passed!"

tools/generate_excluded_gems/generate_excluded_gems_test.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ trap cleanup_temp_dirs EXIT
5353

5454
# Test 1: Basic dry-run with .ruby-version
5555
test_basic_dry_run() {
56-
echo "TEST: Basic dry-run with .ruby-version"
5756

5857
local temp_dir
5958
temp_dir="$(mktemp -d)"
@@ -79,12 +78,10 @@ test_basic_dry_run() {
7978
assert_equal "${expected}" "${output}" \
8079
"Output should match expected excluded gems"
8180

82-
echo "PASS: Basic dry-run with .ruby-version"
8381
}
8482

8583
# Test 2: Explicit Ruby version
8684
test_explicit_ruby_version() {
87-
echo "TEST: Explicit Ruby version"
8885

8986
local temp_dir
9087
temp_dir="$(mktemp -d)"
@@ -109,12 +106,10 @@ test_explicit_ruby_version() {
109106
fail "Output should not contain csv (non-native gem)"
110107
fi
111108

112-
echo "PASS: Explicit Ruby version"
113109
}
114110

115111
# Test 3: Missing .ruby-version without --ruby-version
116112
test_missing_ruby_version() {
117-
echo "TEST: Missing .ruby-version without --ruby-version"
118113

119114
local temp_dir
120115
temp_dir="$(mktemp -d)"
@@ -133,12 +128,10 @@ test_missing_ruby_version() {
133128
fail "Should have failed when .ruby-version is missing"
134129
fi
135130

136-
echo "PASS: Missing .ruby-version without --ruby-version"
137131
}
138132

139133
# Test 4: Ruby version not in stdgems data
140134
test_unsupported_ruby_version() {
141-
echo "TEST: Ruby version not in stdgems data"
142135

143136
local temp_dir
144137
temp_dir="$(mktemp -d)"
@@ -158,12 +151,10 @@ test_unsupported_ruby_version() {
158151
fail "Should have failed for unsupported Ruby version"
159152
fi
160153

161-
echo "PASS: Ruby version not in stdgems data"
162154
}
163155

164156
# Test 5: Ruby 3.3 version
165157
test_ruby_33_version() {
166-
echo "TEST: Ruby 3.3 version"
167158

168159
local temp_dir
169160
temp_dir="$(mktemp -d)"
@@ -183,7 +174,6 @@ test_ruby_33_version() {
183174
assert_match "psych" "${output}" "Output should contain psych"
184175
assert_match "json" "${output}" "Output should contain json"
185176

186-
echo "PASS: Ruby 3.3 version"
187177
}
188178

189179
# Run all tests
@@ -193,5 +183,3 @@ test_missing_ruby_version
193183
test_unsupported_ruby_version
194184
test_ruby_33_version
195185

196-
echo ""
197-
echo "All tests passed!"

tools/generate_rv_checksums/generate_rv_checksums_integration_test.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,11 @@ set -e
2424

2525
# MARK - Locate Deps
2626

27-
echo "DEBUG: Starting to locate dependencies"
28-
2927
assertions_sh_location=cgrindel_bazel_starlib/shlib/lib/assertions.sh
3028
assertions_sh="$(rlocation "${assertions_sh_location}")" \
3129
|| (echo >&2 "Failed to locate ${assertions_sh_location}" && exit 1)
32-
echo "DEBUG: Found assertions_sh at ${assertions_sh}"
3330
# shellcheck disable=SC1090
3431
source "${assertions_sh}"
35-
echo "DEBUG: Sourced assertions_sh"
3632

3733
generate_rv_checksums_location=rules_ruby/tools/generate_rv_checksums/generate_rv_checksums.sh
3834
generate_rv_checksums="$(rlocation "${generate_rv_checksums_location}")"
@@ -55,8 +51,6 @@ trap cleanup_temp_dirs EXIT
5551

5652
# Test: Buildozer updates MODULE.bazel correctly
5753
test_buildozer_updates() {
58-
echo "TEST: Buildozer updates MODULE.bazel correctly"
59-
6054
local temp_dir
6155
temp_dir="$(mktemp -d)"
6256
temp_dirs+=("${temp_dir}")
@@ -120,14 +114,10 @@ EOF
120114
# Verify ruby_version was NOT changed (we didn't update it)
121115
assert_match 'ruby_version = "3.3.0"' "${module_content}" \
122116
"MODULE.bazel should preserve existing ruby_version"
123-
124-
echo "PASS: Buildozer updates MODULE.bazel correctly"
125117
}
126118

127119
# Test: Buildozer updates only target toolchain by name
128120
test_buildozer_name_filtering() {
129-
echo "TEST: Buildozer updates only target toolchain by name"
130-
131121
local temp_dir
132122
temp_dir="$(mktemp -d)"
133123
temp_dirs+=("${temp_dir}")
@@ -181,13 +171,8 @@ EOF
181171
if ! grep -B5 'name = "ruby_alt"' MODULE.bazel | grep -q 'name = "ruby"'; then
182172
fail "First toolchain should still exist"
183173
fi
184-
185-
echo "PASS: Buildozer updates only target toolchain by name"
186174
}
187175

188176
# Run all tests
189177
test_buildozer_updates
190178
test_buildozer_name_filtering
191-
192-
echo ""
193-
echo "All integration tests passed!"

tools/generate_rv_checksums/generate_rv_checksums_test.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ trap cleanup_temp_dirs EXIT
5353

5454
# Test 1: Basic dry-run with .ruby-version
5555
test_basic_dry_run() {
56-
echo "TEST: Basic dry-run with .ruby-version"
5756

5857
local temp_dir
5958
temp_dir="$(mktemp -d)"
@@ -78,12 +77,10 @@ test_basic_dry_run() {
7877

7978
assert_equal "${expected}" "${output}" "Output should match expected checksums"
8079

81-
echo "PASS: Basic dry-run with .ruby-version"
8280
}
8381

8482
# Test 2: Explicit Ruby version
8583
test_explicit_ruby_version() {
86-
echo "TEST: Explicit Ruby version"
8784

8885
local temp_dir
8986
temp_dir="$(mktemp -d)"
@@ -104,12 +101,10 @@ test_explicit_ruby_version() {
104101
assert_match "0c08c35a99f10817643d548f98012268c5433ae25a737ab4d6751336108a941d" "${output}" \
105102
"Output should contain correct checksum"
106103

107-
echo "PASS: Explicit Ruby version"
108104
}
109105

110106
# Test 3: Missing .ruby-version without --ruby-version
111107
test_missing_ruby_version() {
112-
echo "TEST: Missing .ruby-version without --ruby-version"
113108

114109
local temp_dir
115110
temp_dir="$(mktemp -d)"
@@ -128,12 +123,10 @@ test_missing_ruby_version() {
128123
fail "Should have failed when .ruby-version is missing"
129124
fi
130125

131-
echo "PASS: Missing .ruby-version without --ruby-version"
132126
}
133127

134128
# Test 4: Invalid rv_version
135129
test_invalid_rv_version() {
136-
echo "TEST: Invalid rv_version"
137130

138131
local temp_dir
139132
temp_dir="$(mktemp -d)"
@@ -150,7 +143,6 @@ test_invalid_rv_version() {
150143
fail "Should have failed for invalid rv_version"
151144
fi
152145

153-
echo "PASS: Invalid rv_version"
154146
}
155147

156148
# Run all tests
@@ -159,5 +151,3 @@ test_explicit_ruby_version
159151
test_missing_ruby_version
160152
test_invalid_rv_version
161153

162-
echo ""
163-
echo "All tests passed!"

0 commit comments

Comments
 (0)