(tests): PollTimeout round-trip, uploader ResponseError, panic ErrorEvent, status secret compare, parseCommand + botname
Golang lint / lint (push) Successful in 2m42s
Golang lint / lint (pull_request) Successful in 2m42s

(doc): TODO test checklist closed
This commit is contained in:
2026-05-20 12:42:36 +03:00
parent 8a3f2cedf2
commit 950ce6b88c
6 changed files with 217 additions and 6 deletions
+3
View File
@@ -311,6 +311,9 @@ func TestStatusHandlerRequiresMatchingSecret(t *testing.T) {
}{
{name: "missing auth", wantStatus: http.StatusNotFound},
{name: "wrong auth", headerName: "Authorization", headerVal: "wrong", wantStatus: http.StatusNotFound},
{name: "matching length wrong content", headerName: "X-Telegram-Bot-Api-Secret-Token", headerVal: "secres", wantStatus: http.StatusNotFound},
{name: "shared prefix shorter", headerName: "X-Telegram-Bot-Api-Secret-Token", headerVal: "secre", wantStatus: http.StatusNotFound},
{name: "shared prefix longer", headerName: "X-Telegram-Bot-Api-Secret-Token", headerVal: "secretxx", wantStatus: http.StatusNotFound},
{name: "matching telegram header", headerName: "X-Telegram-Bot-Api-Secret-Token", headerVal: "secret", wantStatus: http.StatusOK},
}