test: retry transient unauthenticated upload probe
This commit is contained in:
@@ -4,6 +4,7 @@ import test from 'node:test'
|
||||
|
||||
import {
|
||||
confirmedNetSummary,
|
||||
isTransientGatewayFailure,
|
||||
normalizeWeightPalletOptionPage,
|
||||
normalizedGrossKg,
|
||||
palletOptionsPath,
|
||||
@@ -13,6 +14,15 @@ import {
|
||||
workspaceWeightMatchesBaseline,
|
||||
} from './inbound-weight-ocr.mjs'
|
||||
|
||||
test('retries only transient gateway failures for the unauthenticated upload probe', () => {
|
||||
assert.equal(isTransientGatewayFailure({ http: 0 }), true)
|
||||
assert.equal(isTransientGatewayFailure({ http: 502 }), true)
|
||||
assert.equal(isTransientGatewayFailure({ http: 503 }), true)
|
||||
assert.equal(isTransientGatewayFailure({ http: 401 }), false)
|
||||
assert.equal(isTransientGatewayFailure({ http: 403 }), false)
|
||||
assert.equal(isTransientGatewayFailure({ http: 500 }), false)
|
||||
})
|
||||
|
||||
test('selects a stable complete pallet snapshot without status or availability', () => {
|
||||
const selected = selectWeightPallet([
|
||||
{ palletId: '20', palletCode: 'P-20', palletType: 'STANDARD', capacityCbm: 2, tareWeightKg: 18.5 },
|
||||
|
||||
Reference in New Issue
Block a user