Add initial server health check and update Harbor versions
All checks were successful
Build and Deploy Gateway / build-and-push (push) Successful in 14s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-07-12 18:49:45 +03:00
parent d551d41b71
commit 5874df2fce
4 changed files with 79 additions and 19 deletions

View File

@@ -36,8 +36,11 @@ test('server picker handles 1, 30 and 300 stable-ID servers with duplicate label
assert.equal(SERVER_RESULT_WINDOW, 60);
});
test('server picker keeps health manual and the rendered result window bounded', () => {
test('server picker checks health once on load, keeps manual refresh and bounds the result window', () => {
assert.doesNotMatch(overview, /pingAll|servers\.ping/);
assert.match(picker, /const initialCheckStarted = useRef\(false\)/);
assert.match(picker, /if \(initialCheckStarted\.current \|\| !servers\.length\) return/);
assert.match(picker, /initialCheckStarted\.current = true;\s*checkVisible\(\)/);
assert.match(picker, /onClick={checkVisible}/);
assert.match(picker, /\.slice\(page \* SERVER_RESULT_WINDOW, \(page \+ 1\) \* SERVER_RESULT_WINDOW\)/);
assert.match(picker, /\.slice\(0, 30\)/);
@@ -50,7 +53,8 @@ test('server picker keeps health manual and the rendered result window bounded',
test('manual health remains visible for Auto and simple rows', () => {
assert.match(picker, /autoActive \? serverHealthText\(pings\[selectedServerId\]\)/);
assert.match(picker, /disabled={checking \|\| \(!selectedServerId && !visible\.length\)}/);
assert.match(picker, /className="client-server-check"/);
assert.match(picker, /server={servers\[0\]}[\s\S]*?ping={pings\[servers\[0\]\.id\]}/);
assert.match(picker, /simpleServers\.map[\s\S]*?ping={pings\[server\.id\]}/);
});