-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add sdm unit tests from source-declarative-manifest connector …
…directory (#82)
- Loading branch information
1 parent
249fa23
commit 2368b59
Showing
15 changed files
with
1,557 additions
and
10 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,5 +37,5 @@ jobs: | |
Chore | ||
build | ||
Build | ||
test | ||
Test | ||
tests | ||
Tests |
Empty file.
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,53 @@ | ||
# | ||
# Copyright (c) 2024 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
import pytest | ||
import os | ||
import yaml | ||
|
||
|
||
def get_fixture_path(file_name): | ||
return os.path.join(os.path.dirname(__file__), file_name) | ||
|
||
|
||
@pytest.fixture | ||
def valid_remote_config(): | ||
return get_fixture_path("resources/valid_remote_config.json") | ||
|
||
|
||
@pytest.fixture | ||
def invalid_remote_config(): | ||
return get_fixture_path("resources/invalid_remote_config.json") | ||
|
||
|
||
@pytest.fixture | ||
def valid_local_manifest(): | ||
return get_fixture_path("resources/valid_local_manifest.yaml") | ||
|
||
|
||
@pytest.fixture | ||
def invalid_local_manifest(): | ||
return get_fixture_path("resources/invalid_local_manifest.yaml") | ||
|
||
|
||
@pytest.fixture | ||
def valid_local_manifest_yaml(valid_local_manifest): | ||
with open(valid_local_manifest, "r") as file: | ||
return yaml.safe_load(file) | ||
|
||
|
||
@pytest.fixture | ||
def invalid_local_manifest_yaml(invalid_local_manifest): | ||
with open(invalid_local_manifest, "r") as file: | ||
return yaml.safe_load(file) | ||
|
||
|
||
@pytest.fixture | ||
def valid_local_config_file(): | ||
return get_fixture_path("resources/valid_local_pokeapi_config.json") | ||
|
||
|
||
@pytest.fixture | ||
def invalid_local_config_file(): | ||
return get_fixture_path("resources/invalid_local_pokeapi_config.json") |
Empty file.
8 changes: 8 additions & 0 deletions
8
unit_tests/source_declarative_manifest/resources/invalid_local_manifest.yaml
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,8 @@ | ||
version: 0.78.5 | ||
|
||
type: DeclarativeSource | ||
|
||
check: | ||
type: CheckStream | ||
stream_names: | ||
- pokemon |
1 change: 1 addition & 0 deletions
1
unit_tests/source_declarative_manifest/resources/invalid_local_pokeapi_config.json
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 @@ | ||
{} |
1 change: 1 addition & 0 deletions
1
unit_tests/source_declarative_manifest/resources/invalid_remote_config.json
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 @@ | ||
{} |
Oops, something went wrong.