Skip to content

Commit

Permalink
vdk-dag: fix failing validation tests (#2712)
Browse files Browse the repository at this point in the history
## Why?

Tests started failing after
#2666 Most likely due
to not wrapping errors in UserCodeError anymore

## What?

Pass the dag name to the dag validation test fixture

Expect just one request in the dag, as we do a GET request to fetch the
job info before doing validation

## How was this tested?

Ran test suite locally

## What kind of change is this?

Bugfix

Signed-off-by: Dilyan Marinov <[email protected]>
  • Loading branch information
DeltaMichael authored Sep 28, 2023
1 parent 30a3d50 commit e48c8a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions projects/vdk-plugins/vdk-dag/tests/test_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,9 @@ def _assert_dag_fails_with_error(self, result, error):
self.env_vars,
):
assert isinstance(result.exception, error)
# only the request that fetches the job info should be present
# no other request should be tried as the DAG fails
assert len(self.httpserver.log) == 0
assert len(self.httpserver.log) == 1

def test_dag(self):
dag = "dag"
Expand Down Expand Up @@ -427,7 +428,7 @@ def test_dag_execution_type_propagation(self):
self.httpserver.stop()

def _test_dag_validation(self, dag_name):
self._set_up()
self._set_up(dag_name=dag_name)
with mock.patch.dict(
os.environ,
self.env_vars,
Expand Down

0 comments on commit e48c8a8

Please sign in to comment.