forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Yoda conditions revert expdcted / checked values. We are adding ruff rule to avoid them.
- Loading branch information
Showing
232 changed files
with
2,803 additions
and
2,433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,8 +153,8 @@ def test_basic_deployments(self, version): | |
if chart_name and "postgresql" in chart_name: | ||
continue | ||
k8s_name = k8s_object["kind"] + ":" + k8s_object["metadata"]["name"] | ||
assert "TEST-VALUE" == labels.get( | ||
"test-label" | ||
assert ( | ||
labels.get("test-label") == "TEST-VALUE" | ||
), f"Missing label test-label on {k8s_name}. Current labels: {labels}" | ||
|
||
def test_basic_deployments_with_standard_naming(self): | ||
|
@@ -254,8 +254,8 @@ def test_basic_deployment_with_standalone_dag_processor(self, version): | |
if chart_name and "postgresql" in chart_name: | ||
continue | ||
k8s_name = k8s_object["kind"] + ":" + k8s_object["metadata"]["name"] | ||
assert "TEST-VALUE" == labels.get( | ||
"test-label" | ||
assert ( | ||
labels.get("test-label") == "TEST-VALUE" | ||
), f"Missing label test-label on {k8s_name}. Current labels: {labels}" | ||
|
||
@pytest.mark.parametrize("version", ["2.3.2", "2.4.0", "default"]) | ||
|
@@ -493,7 +493,7 @@ def test_annotations_on_airflow_pods_in_deployment(self): | |
) | ||
# pod_template_file is tested separately as it has extra setup steps | ||
|
||
assert 8 == len(k8s_objects) | ||
assert len(k8s_objects) == 8 | ||
|
||
for k8s_object in k8s_objects: | ||
annotations = k8s_object["spec"]["template"]["metadata"]["annotations"] | ||
|
@@ -600,8 +600,8 @@ def test_postgres_connection_url_no_override(self): | |
show_only=["templates/secrets/metadata-connection-secret.yaml"], | ||
)[0] | ||
assert ( | ||
"postgresql://postgres:[email protected]:5432/postgres?sslmode=disable" | ||
== base64.b64decode(doc["data"]["connection"]).decode("utf-8") | ||
base64.b64decode(doc["data"]["connection"]).decode("utf-8") | ||
== "postgresql://postgres:[email protected]:5432/postgres?sslmode=disable" | ||
) | ||
|
||
def test_postgres_connection_url_pgbouncer(self): | ||
|
@@ -612,9 +612,9 @@ def test_postgres_connection_url_pgbouncer(self): | |
values={"pgbouncer": {"enabled": True}}, | ||
)[0] | ||
assert ( | ||
"postgresql://postgres:[email protected]:6543/" | ||
base64.b64decode(doc["data"]["connection"]).decode("utf-8") | ||
== "postgresql://postgres:[email protected]:6543/" | ||
"my-release-metadata?sslmode=disable" | ||
== base64.b64decode(doc["data"]["connection"]).decode("utf-8") | ||
) | ||
|
||
def test_postgres_connection_url_pgbouncer_use_standard_naming(self): | ||
|
@@ -625,9 +625,9 @@ def test_postgres_connection_url_pgbouncer_use_standard_naming(self): | |
values={"useStandardNaming": True, "pgbouncer": {"enabled": True}}, | ||
)[0] | ||
assert ( | ||
"postgresql://postgres:[email protected]:6543/" | ||
base64.b64decode(doc["data"]["connection"]).decode("utf-8") | ||
== "postgresql://postgres:[email protected]:6543/" | ||
"my-release-metadata?sslmode=disable" | ||
== base64.b64decode(doc["data"]["connection"]).decode("utf-8") | ||
) | ||
|
||
def test_postgres_connection_url_name_override(self): | ||
|
@@ -639,8 +639,8 @@ def test_postgres_connection_url_name_override(self): | |
)[0] | ||
|
||
assert ( | ||
"postgresql://postgres:postgres@overrideName:5432/postgres?sslmode=disable" | ||
== base64.b64decode(doc["data"]["connection"]).decode("utf-8") | ||
base64.b64decode(doc["data"]["connection"]).decode("utf-8") | ||
== "postgresql://postgres:postgres@overrideName:5432/postgres?sslmode=disable" | ||
) | ||
|
||
def test_priority_classes(self): | ||
|
@@ -685,9 +685,10 @@ def test_redis_broker_connection_url(self): | |
show_only=["templates/secrets/redis-secrets.yaml"], | ||
values={"redis": {"enabled": True, "password": "test1234"}}, | ||
)[1] | ||
assert "redis://:test1234@my-release-redis:6379/0" == base64.b64decode( | ||
doc["data"]["connection"] | ||
).decode("utf-8") | ||
assert ( | ||
base64.b64decode(doc["data"]["connection"]).decode("utf-8") | ||
== "redis://:test1234@my-release-redis:6379/0" | ||
) | ||
|
||
def test_redis_broker_connection_url_use_standard_naming(self): | ||
# no nameoverride, redis and useStandardNaming | ||
|
@@ -696,9 +697,10 @@ def test_redis_broker_connection_url_use_standard_naming(self): | |
show_only=["templates/secrets/redis-secrets.yaml"], | ||
values={"useStandardNaming": True, "redis": {"enabled": True, "password": "test1234"}}, | ||
)[1] | ||
assert "redis://:test1234@my-release-airflow-redis:6379/0" == base64.b64decode( | ||
doc["data"]["connection"] | ||
).decode("utf-8") | ||
assert ( | ||
base64.b64decode(doc["data"]["connection"]).decode("utf-8") | ||
== "redis://:test1234@my-release-airflow-redis:6379/0" | ||
) | ||
|
||
@staticmethod | ||
def default_trigger_obj(version): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.