Skip to content

Commit

Permalink
[metricsadvisor] convert to test proxy (#21974)
Browse files Browse the repository at this point in the history
* update sync base testcases and conftest to use test proxy

* remove dep on unittest

* add sanitizers for test secrets

* convert one test

* fix weird spacing

* refactor base testcase into preparer

* convert test_alert_config.py + recordings

* recordings

* updates for aad tests

* test_credential and test_credential_entities, no recordings b/c need to fix sanitizer

* add rstrip / to client endpoint

* convert data_feed_ingestion

* convert data_feeds

* convert detection_config

* convert hooks

* update ma client tests

* refactor to simplify base test class and secrets needed

* refactor, parametrize auth option

* refactor / parametrize async + add preparer

* convert async tests to proxy

* add oauth sanitizer

* add test proxy to ci.yaml

* update testcases and have proxy auto start

* rename test_id -> ids, fix clean up so we raise better errors, add more randomization in names

* rerecord and delete old recordings

* rename tests to fix max path length and try removing max parallel for live tests

* ugh fix for py2.7

* fix envars for live tests

* fixes for live tests

* adjust list data feeds tests to be less flaky

* add rstrip before sanitizing
  • Loading branch information
kristapratico authored Jan 8, 2022
1 parent d98fa5b commit a24c4b6
Show file tree
Hide file tree
Showing 766 changed files with 98,025 additions and 68,020 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def __init__(self, endpoint, credential, **kwargs):
try:
if not endpoint.lower().startswith("http"):
endpoint = "https://" + endpoint
endpoint = endpoint.rstrip("/")
except AttributeError:
raise ValueError("Base URL must be a string.")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def __init__(self, endpoint, credential, **kwargs):
try:
if not endpoint.lower().startswith("http"):
endpoint = "https://" + endpoint
endpoint = endpoint.rstrip("/")
except AttributeError:
raise ValueError("Base URL must be a string.")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def __init__(self, endpoint, credential, **kwargs):
try:
if not endpoint.lower().startswith("http"):
endpoint = "https://" + endpoint
endpoint = endpoint.rstrip("/")
except AttributeError:
raise ValueError("Base URL must be a string.")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def __init__(self, endpoint, credential, **kwargs):
try:
if not endpoint.lower().startswith("http"):
endpoint = "https://" + endpoint
endpoint = endpoint.rstrip("/")
except AttributeError:
raise ValueError("Base URL must be a string.")

Expand Down

This file was deleted.

Large diffs are not rendered by default.

This file was deleted.

Loading

0 comments on commit a24c4b6

Please sign in to comment.