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

Make the core testbase off-line ready #9324

Closed
lmazuel opened this issue Jan 4, 2020 · 10 comments
Closed

Make the core testbase off-line ready #9324

lmazuel opened this issue Jan 4, 2020 · 10 comments
Assignees
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. good first issue This issue tracks work that may be a good starting point for a first-time contributor help wanted This issue is tracking work for which community contributions would be welcomed and appreciated

Comments

@lmazuel
Copy link
Member

lmazuel commented Jan 4, 2020

There is several tests that call httbin or bing, and they can't pass if there is no network. Need to find a way todo an actual HTTP request, with the less possible mock so we're confident it's working as expected.

I think I remember httpbin can be install locally, maybe that?

To investigate.

@lmazuel lmazuel added Client This issue points to a problem in the data-plane of the library. Azure.Core labels Jan 4, 2020
@bryevdv
Copy link
Contributor

bryevdv commented Jan 7, 2020

Maybe https://pypi.org/project/pytest-httpbin/ (which AFAICT is not the actual httpbin)?

@xiangyan99 xiangyan99 self-assigned this Jan 23, 2020
@lmazuel lmazuel added good first issue This issue tracks work that may be a good starting point for a first-time contributor help wanted This issue is tracking work for which community contributions would be welcomed and appreciated labels Oct 26, 2021
@iscai-msft
Copy link
Contributor

we've added a flask testserver for python's azure-core tests. Most (but not all) tests are using this testserver.

@xiangyan99
Copy link
Member

we've added a flask testserver for python's azure-core tests. Most (but not all) tests are using this testserver.

We are not 100% there yet. We still have streaming tests which rely on live storage account.

@iscai-msft
Copy link
Contributor

Here's a file with the streaming tests that @xiangyan99 mentioned

account_url = "https://{}.blob.core.windows.net".format(account_name)

DaisyCisneros added a commit to DaisyCisneros/azure-sdk-for-python that referenced this issue Nov 19, 2021
…_no_header test in test_streaming.py by utilizing a new function I added in streams.py. This new test named test_compress_plain_no_header_offline, passes!
hildurhodd pushed a commit to hildurhodd/azure-sdk-for-python that referenced this issue Jan 4, 2022
iscai-msft pushed a commit that referenced this issue Jan 14, 2022
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this issue Jan 18, 2022
…into add_back_error_message

* 'main' of https://github.com/Azure/azure-sdk-for-python:
  switch error str tests to in (Azure#22016)
  drop py27 support (Azure#22531)
  Update TextAnalytics to enable live testing in sovereign clouds for multiple services (Azure#22461)
  fix: body is too long when create github release (Azure#22522)
  [AutoRelease] t2-labservices-2022-01-10-05622 (Azure#22401)
  [ACR] Change to support python3.6 or above only (Azure#22325)
  Sync eng/common directory with azure-sdk-tools for PR 2554 (Azure#22515)
  [purview catalog] regen with guids rest name fix (Azure#22495)
  Migrate EG tests to test proxy (Azure#21772)
  [Test Proxy] Normalize paths in test IDs (Azure#22508)
  Add packages to $PackageExclusions which do not build properly in Docs CI (Azure#22493)
  Update Manifest Publishing (Azure#22476)
  Issue Azure#9324 by DaisyCisneros (Azure#21824)
marcusc2 added a commit to marcusc2/azure-sdk-for-python that referenced this issue Jan 21, 2022
rakshith91 pushed a commit to rakshith91/azure-sdk-for-python that referenced this issue Apr 10, 2022
@kristapratico
Copy link
Member

Tests that need to be made offline:

test_streaming.py

  • test_decompress_plain_no_header
  • test_decompress_compressed_no_header
  • test_compress_plain_header
  • test_compress_compressed_header

test_streaming_async.py

  • test_decompress_plain_no_header
  • test_compress_plain_no_header
  • test_decompress_compressed_no_header
  • test_compress_compressed_no_header
  • test_decompress_plain_header
  • test_compress_plain_header
  • test_decompress_compressed_header
  • test_compress_compressed_header

@HimanshuBarak
Copy link
Contributor

@kristapratico I would love to take these up one by one(or all together depending on the requirement). I have already started and raised this PR : #33800 . I just need the reviewers feedback to make sure I am on the right track. If there is any feedback, I would be happy to incorporate it in my next revisions.

@HimanshuBarak
Copy link
Contributor

HimanshuBarak commented Jan 20, 2024

Hey everyone .hope it is going well. I have updated #33800 to add all the test cases needed to be made offline. Currently all my changes are in a single PR. If you want me to break into multiple PR's for each test I can do that as well. If the code is not par or some case is missing. I would be happy to fix it. I would really really appreciate any response/feedback from your side.

@HimanshuBarak
Copy link
Contributor

Hey everyone any feedback on the PR #33800 ??

@kristapratico
Copy link
Member

@HimanshuBarak thanks for your patience. Review feedback was left on the PR.

@kristapratico
Copy link
Member

Completed in #33800 and #34247

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. good first issue This issue tracks work that may be a good starting point for a first-time contributor help wanted This issue is tracking work for which community contributions would be welcomed and appreciated
Projects
None yet
Development

No branches or pull requests

6 participants