1919def test_get_task_instances (task_instance_api_setup ):
2020 """Test the /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances API EP"""
2121 api_response = task_instance_api_setup .get_task_instances (
22- dag_id = "test_glue_partitions_sensor " ,
22+ dag_id = "example_bash_operator " ,
2323 dag_run_id = "scheduled__2020-04-13T00:00:00+00:00" ,
2424 )
2525 logging .getLogger ().info ("%s" , api_response )
@@ -30,7 +30,7 @@ def test_get_task_instances_batch(task_instance_api_setup):
3030 """Test the /dags/~/dagRuns/~/taskInstances/list API EP"""
3131 list_task_instance_form = ListTaskInstanceForm (
3232 dag_ids = [
33- "test_glue_partitions_sensor " ,
33+ "example_bash_operator " ,
3434 ],
3535 # ====================================================
3636 # Uncomment the following to add to the filter
@@ -59,3 +59,46 @@ def test_get_task_instances_batch(task_instance_api_setup):
5959 )
6060 logging .getLogger ().info ("%s" , api_response )
6161 print (f"{ BCOLORS .OKGREEN } OK{ BCOLORS .ENDC } " )
62+
63+
64+ def test_get_task_instance (task_instance_api_setup ):
65+ """
66+ Test the /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}
67+ API EP
68+ """
69+ api_response = task_instance_api_setup .get_task_instance (
70+ dag_id = "example_bash_operator" ,
71+ dag_run_id = "scheduled__2021-03-20T00:00:00+00:00" ,
72+ task_id = "runme_0" ,
73+ )
74+ logging .getLogger ().info ("%s" , api_response )
75+ print (f"{ BCOLORS .OKGREEN } OK{ BCOLORS .ENDC } " )
76+
77+ def test_get_extra_links (task_instance_api_setup ):
78+ """
79+ Test the /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/links
80+ API EP
81+ """
82+ api_response = task_instance_api_setup .get_extra_links (
83+ dag_id = "example_bash_operator" ,
84+ dag_run_id = "scheduled__2021-03-20T00:00:00+00:00" ,
85+ task_id = "runme_0" ,
86+ )
87+ logging .getLogger ().info ("%s" , api_response )
88+ print (f"{ BCOLORS .OKGREEN } OK{ BCOLORS .ENDC } " )
89+
90+ def test_get_logs (task_instance_api_setup ):
91+ """
92+ Test the
93+ /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/logs/
94+ {task_try_number}
95+ API EP
96+ """
97+ api_response = task_instance_api_setup .get_log (
98+ dag_id = "example_bash_operator" ,
99+ dag_run_id = "scheduled__2021-03-20T00:00:00+00:00" ,
100+ task_id = "runme_0" ,
101+ task_try_number = 1 ,
102+ )
103+ logging .getLogger ().info ("%s" , api_response )
104+ print (f"{ BCOLORS .OKGREEN } OK{ BCOLORS .ENDC } " )
0 commit comments