-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
connectors-ci: fix pip install error (#29156)
- Loading branch information
1 parent
2866ed6
commit 1de0add
Showing
9 changed files
with
86 additions
and
25 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
39 changes: 39 additions & 0 deletions
39
airbyte-ci/connectors/pipelines/tests/test_actions/test_environments.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,39 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
import pytest | ||
from connector_ops.utils import Connector | ||
from pipelines.actions import environments | ||
from pipelines.contexts import PipelineContext | ||
|
||
pytestmark = [ | ||
pytest.mark.anyio, | ||
] | ||
|
||
|
||
@pytest.fixture | ||
def python_connector() -> Connector: | ||
return Connector("source-openweather") | ||
|
||
|
||
@pytest.fixture | ||
def context(dagger_client): | ||
context = PipelineContext( | ||
pipeline_name="test", | ||
is_local=True, | ||
git_branch="test", | ||
git_revision="test", | ||
) | ||
context.dagger_client = dagger_client | ||
return context | ||
|
||
|
||
async def test_with_installed_python_package(context, python_connector): | ||
python_environment = context.dagger_client.container().from_("python:3.9") | ||
installed_connector_package = await environments.with_installed_python_package( | ||
context, | ||
python_environment, | ||
str(python_connector.code_directory), | ||
) | ||
await installed_connector_package.with_exec(["python", "main.py", "spec"]) |
File renamed without changes.
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,3 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# |
File renamed without changes.
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