forked from dagster-io/dagster
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[5/n][dagster-airbyte] Implement fetch_airbyte_workspace_data (dagste…
…r-io#26253) ## Summary & Motivation This PR implements `AirbyteCloudWorkspace.fetch_airbyte_workspace_data`, that fetches the connections and destinations included in a given workspace. ## How I Tested These Changes Additional unit tests with BK.
- Loading branch information
1 parent
f6e734d
commit 1a1b03b
Showing
3 changed files
with
101 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
..._modules/libraries/dagster-airbyte/dagster_airbyte_tests/experimental/test_asset_specs.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import responses | ||
from dagster_airbyte import AirbyteCloudWorkspace | ||
|
||
from dagster_airbyte_tests.experimental.conftest import ( | ||
TEST_CLIENT_ID, | ||
TEST_CLIENT_SECRET, | ||
TEST_WORKSPACE_ID, | ||
) | ||
|
||
|
||
def test_fetch_airbyte_workspace_data( | ||
fetch_workspace_data_api_mocks: responses.RequestsMock, | ||
) -> None: | ||
resource = AirbyteCloudWorkspace( | ||
workspace_id=TEST_WORKSPACE_ID, | ||
client_id=TEST_CLIENT_ID, | ||
client_secret=TEST_CLIENT_SECRET, | ||
) | ||
|
||
actual_workspace_data = resource.fetch_airbyte_workspace_data() | ||
assert len(actual_workspace_data.connections_by_id) == 1 | ||
assert len(actual_workspace_data.destinations_by_id) == 1 |