|
1 | 1 | import os |
2 | | -import shutil |
3 | 2 | from datetime import datetime |
4 | | -from urllib.parse import urlparse |
5 | 3 |
|
6 | 4 | from ddeutil.workflow import SUCCESS, Result, Workflow |
7 | 5 |
|
8 | 6 |
|
9 | 7 | def test_example_stage_exec_nested_trigger(test_path): |
10 | | - if (test_path / "example/logs").exists(): |
11 | | - shutil.rmtree(test_path / "example/logs") |
| 8 | + # if (test_path / "example/logs").exists(): |
| 9 | + # shutil.rmtree(test_path / "example/logs") |
12 | 10 |
|
13 | 11 | workflow = Workflow.from_conf( |
14 | 12 | "stream-workflow", |
15 | 13 | extras={ |
16 | | - "trace_url": urlparse(str(test_path / "example/logs/trace")), |
17 | | - "audit_url": str(test_path / "example/logs/audit"), |
18 | | - "enable_write_log": True, |
| 14 | + "trace_handlers": [ |
| 15 | + {"type": "console"}, |
| 16 | + { |
| 17 | + "type": "file", |
| 18 | + "path": str((test_path / "example/logs/trace").absolute()), |
| 19 | + }, |
| 20 | + ], |
| 21 | + "audit_conf": { |
| 22 | + "type": "file", |
| 23 | + "path": str((test_path / "example/logs/audit").absolute()), |
| 24 | + }, |
19 | 25 | "enable_write_audit": True, |
20 | 26 | }, |
21 | 27 | ) |
22 | 28 |
|
23 | 29 | os.environ["EXAMPLE_SECRET_TOKEN"] = "very-secret-value" |
24 | 30 |
|
25 | 31 | rs: Result = workflow.release( |
26 | | - datetime(2025, 5, 10, 12, 35), |
| 32 | + # datetime(2025, 5, 10, 12, 35), |
| 33 | + datetime.now(), |
27 | 34 | params={ |
28 | 35 | "run-mode": "N", |
29 | 36 | "name": "starter-stream-name", |
|
0 commit comments