klappvisor / haskell-telegram-api

Telegram Bot API for Haskell
BSD 3-Clause "New" or "Revised" License
201 stars 67 forks source link

Test "should send photo" fails when executed locally #27

Closed timjb closed 8 years ago

timjb commented 8 years ago

My guess is that the hardcoded file_id in the test source code only works with @klappvisor's test bot.

klappvisor commented 8 years ago

confirmed

klappvisor commented 8 years ago

@timjb I have tried to redirect the photo to public channel to make it available. Could you please check is it still failing?

timjb commented 8 years ago

It's still failing. Here's the response from sendPhoto:

Left (FailureResponse {responseStatus = Status {statusCode = 400, statusMessage = "Bad Request"}, responseContentType = application/json, responseBody = "{\"ok\":false,\"error_code\":400,\"description\":\"Wrong file identifier was specified\"}"})
klappvisor commented 8 years ago

hopefully #33 will fix it. (When you redirect photo to public chat, Telegram assigns new id to it)

timjb commented 8 years ago

No, #33 didn't fix the tests for me. Now (with 759b647a4ecfeb44af452a937ebbaee1f7406452), I'm getting two failures:

should send photo with file_id FAILED [1] ... should send audio FAILED [2]

klappvisor commented 8 years ago

well... at least it works for CI. I'll keep issue open

klappvisor commented 8 years ago

should be fixed for photos, since now tests upload image first and then send it again by id

klappvisor commented 8 years ago

Changed audio test to follow the same logic as the test for photos, so now it should be fixed. Please reopen this issue, it it's still failing