Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: add sdm unit tests from source-declarative-manifest connector directory #82

Merged
merged 7 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ categories:
- "chore"
- "ci"
- "refactor"
- "testing"
- title: "Documentation 📖"
label: "docs"
change-template: "- $TITLE (#$NUMBER)"
Expand All @@ -38,6 +39,9 @@ autolabeler:
- label: "chore"
title:
- '/^chore(\(.*\))?\:/i'
- label: "testing"
title:
- '/^tests(\(.*\))?\:/i'
- label: "ci"
title:
- '/^ci(\(.*\))?\:/i'
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/pytest_fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@ on:
push:
branches:
- main
paths:
- 'airbyte_cdk/**'
- 'poetry.lock'
- 'pyproject.toml'
pull_request:
paths:
- 'airbyte_cdk/**'
- 'poetry.lock'
- 'pyproject.toml'

jobs:
pytest-fast:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pytest_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ on:
- main
paths:
- 'airbyte_cdk/**'
- 'unit_tests/**'
- 'poetry.lock'
- 'pyproject.toml'
pull_request:
paths:
- 'airbyte_cdk/**'
- 'unit_tests/**'
- 'poetry.lock'
- 'pyproject.toml'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/semantic_pr_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ jobs:
Chore
build
Build
test
Test
tests
Tests
Empty file.
53 changes: 53 additions & 0 deletions unit_tests/source_declarative_manifest/conftest.py
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.
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading
Loading