Skip to content

Conversation

@adombeck
Copy link
Contributor

@adombeck adombeck commented Aug 28, 2025

Changes for improved debuggability, test execution time, and maintainability, including:

  • Lots of improvements to the logs printed by the tests.
  • Avoid unnecessary rebuilds
  • Refactorings

UDENG-8137

@adombeck adombeck force-pushed the improve-ssh-tests branch 11 times, most recently from 7762549 to 28f1faa Compare September 1, 2025 13:35
@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2025

Codecov Report

❌ Patch coverage is 80.26316% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.77%. Comparing base (42c81e0) to head (44d38b9).
⚠️ Report is 86 commits behind head on main.

Files with missing lines Patch % Lines
internal/testlog/testlog.go 78.57% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1046      +/-   ##
==========================================
- Coverage   87.78%   86.77%   -1.02%     
==========================================
  Files          89       90       +1     
  Lines        6150     6222      +72     
  Branches      111      111              
==========================================
  Hits         5399     5399              
- Misses        695      750      +55     
- Partials       56       73      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adombeck adombeck force-pushed the improve-ssh-tests branch 16 times, most recently from f1d6e86 to a0718d1 Compare September 2, 2025 17:05
I've seen this test time out in the CI.
So that we're able to use them from other packages than the
pam/integration-tests.
Writing both stdout and stderr to the same file causes a data race. Lets
use our SyncBuffer instead.
It failed with that error in CI:

      ssh_test.go:491:
          	Error Trace:	/home/runner/work/authd/authd/pam/integration-tests/ssh_test.go:795
          	            				/home/runner/work/authd/authd/pam/integration-tests/ssh_test.go:659
          	            				/home/runner/work/authd/authd/pam/integration-tests/ssh_test.go:491
          	            				/home/runner/work/authd/authd/internal/testutils/testrun.go:83
          	Error:      	Received unexpected error:
          	            	dial tcp :35523: connect: connection reset by peer
          	Test:       	TestSSHAuthenticate/Authenticate_user_switching_auth_mode
The tool's spelling is VHS, not vhs, so let's use that.
We now require Go >= 1.25 so we can drop our workaround for older
versions.
As suggested by reviewer.
As Marco pointed out, in Meson terminology a shared module is a module
that's suitable for dlopen() but not intended as a link target for other
build targets. That matches what we're building here, so lets use
"shared module" instead of "shared library".
require.Contains prints the full `outStr` in the error message without
newlines (it prints them as '\n') which only repeats output that is
already there in a very unreadable way.
As requested by reviewer. We didn't encounter a case yet where we needed
it.
@adombeck adombeck merged commit 736b4ba into main Dec 4, 2025
16 of 18 checks passed
@adombeck adombeck deleted the improve-ssh-tests branch December 4, 2025 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants