jroachgolf84 commented on code in PR #58357:
URL: https://github.com/apache/airflow/pull/58357#discussion_r2534074347
##########
task-sdk-integration-tests/tests/task_sdk_tests/test_variable_operations.py:
##########
@@ -76,25 +76,63 @@ def test_variable_get_not_found(sdk_client):
console.print("[green]✅ Variable get (not found) test passed!")
[email protected](reason="TODO: Implement Variable set test")
def test_variable_set(sdk_client):
"""
Test setting variable value.
Expected: OKResponse with ok=True
Endpoint: PUT /execution/variables/{key}
"""
- console.print("[yellow]TODO: Implement test_variable_set")
- raise NotImplementedError("test_variable_set not implemented")
+ console.print("[yellow]TODO: Setting variable...")
Review Comment:
Addressed!
##########
task-sdk-integration-tests/tests/task_sdk_tests/test_variable_operations.py:
##########
@@ -76,25 +76,63 @@ def test_variable_get_not_found(sdk_client):
console.print("[green]✅ Variable get (not found) test passed!")
[email protected](reason="TODO: Implement Variable set test")
def test_variable_set(sdk_client):
"""
Test setting variable value.
Expected: OKResponse with ok=True
Endpoint: PUT /execution/variables/{key}
"""
- console.print("[yellow]TODO: Implement test_variable_set")
- raise NotImplementedError("test_variable_set not implemented")
+ console.print("[yellow]TODO: Setting variable...")
+
+ response = sdk_client.variables.set("test_variable_key",
"test_variable_value")
+
+ console.print(" Variable Set Response ".center(72, "="))
+ console.print(f"[bright_blue]Response Type:[/] {type(response).__name__}")
+ console.print(f"[bright_blue]Status:[/] {response.ok}")
+ console.print("=" * 72)
+
+ assert isinstance(response, OKResponse)
+ assert response.ok is True
+
+ console.print("[green]✅ Variable set test passed!")
[email protected](reason="TODO: Implement Variable delete test")
def test_variable_delete(sdk_client):
"""
Test deleting variable value.
Expected: OKResponse with ok=True
Endpoint: DELETE /execution/variables/{key}
"""
- console.print("[yellow]TODO: Implement test_variable_delete")
- raise NotImplementedError("test_variable_delete not implemented")
+ console.print("[yellow]Deleting variable...")
+
+ key: str = "test_variable_delete_key"
Review Comment:
Addresses!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]