Skip to content

Commit

Permalink
Added SODA_SCAN_ID test
Browse files Browse the repository at this point in the history
  • Loading branch information
tombaeyens committed Feb 24, 2025
1 parent b7a61f3 commit 04e0b6f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions soda-core/tests/soda_core/tests/components/test_soda_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from soda_core.common.soda_cloud import SodaCloud
from soda_core.tests.helpers.data_source_test_helper import DataSourceTestHelper
from soda_core.tests.helpers.mock_soda_cloud import MockResponse, MockHttpMethod
from soda_core.tests.helpers.mock_soda_cloud import MockResponse, MockHttpMethod, MockRequest
from soda_core.tests.helpers.test_table import TestTableSpecification

test_table_specification = (
Expand All @@ -21,10 +21,12 @@
)


def test_soda_cloud_results(data_source_test_helper: DataSourceTestHelper):
def test_soda_cloud_results(data_source_test_helper: DataSourceTestHelper, env_vars: dict):

test_table = data_source_test_helper.ensure_test_table(test_table_specification)

env_vars["SODA_SCAN_ID"] = "env_var_scan_id"

data_source_test_helper.enable_soda_cloud_mock([MockResponse(
status_code=200,
json_object={"fileId": "777ggg"}
Expand All @@ -42,6 +44,9 @@ def test_soda_cloud_results(data_source_test_helper: DataSourceTestHelper):
"""
)

request_body: dict = data_source_test_helper.soda_cloud.requests[1].json
assert "env_var_scan_id" == request_body["scanId"]


def test_execute_over_agent(data_source_test_helper: DataSourceTestHelper):

Expand Down

0 comments on commit 04e0b6f

Please sign in to comment.