Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Как протестировать получение файла? #231

Closed
batazor opened this issue Oct 19, 2023 · 4 comments
Closed

Как протестировать получение файла? #231

batazor opened this issue Oct 19, 2023 · 4 comments

Comments

@batazor
Copy link

batazor commented Oct 19, 2023

У меня есть тест который проверяет получение файла,в моей кейсе достаточно отличать статус ответа 200/404

response:
  200:

responseHeaders:
  200:
    Content-Type: "image/jpeg"

Однако такой вариант не срабатывает и падает, есть способ проигнорить body в ответе?

Response:
     Status: 200 OK
       Body:
�������������	
�2!�!22222222222222222222222222222222222222222222222222���������"�����������������������������������	
�����������������}��������!1A��Qa�"q�2��#B���R��$3br�	
�```
@lechefer
Copy link

Если убрать блок с "response" и оставить только "responseHeaders" не будет работать случаем?

@lechefer
Copy link

Для "response" он всегда сравнивает тела

@lansfy
Copy link
Contributor

lansfy commented Jan 16, 2024

  response:
    200: "$matchRegexp(.*)"
  responseHeaders:
    200:
      Content-Type: "image/jpeg"

@batazor
Copy link
Author

batazor commented Feb 29, 2024

Да, вариант с "$matchRegexp(.*)" думаю приемлем

@batazor batazor closed this as completed Feb 29, 2024
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

No branches or pull requests

3 participants