Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"unitTests",
"integrationTests",
"acceptanceTests",
"liveTests"
"liveTests",
"smokeTests"
]
},
"testSecrets": {
Expand Down Expand Up @@ -147,6 +148,64 @@
}
}
}
},
"scenarios": {
"description": "List of smoke test scenarios (only applicable when suite is 'smokeTests')",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/airbytehq/airbyte/airbyte-ci/connectors/metadata_service/lib/metadata_service/models/src/SmokeTestScenario.yaml",
"title": "SmokeTestScenario",
"description": "A single smoke test scenario configuration for a connector.",
"type": "object",
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"name": {
"description": "Name of the test scenario (e.g., 'default', 'invalid_config', 'oauth_config')",
"type": "string"
},
"config_file": {
"description": "Relative path to the config file to use for this scenario",
"type": "string"
},
"config_settings": {
"description": "Optional dictionary of config settings to override or supplement config_file settings",
"type": "object",
"additionalProperties": true
},
"expect_failure": {
"description": "Whether the scenario is expected to fail",
"type": "boolean",
"default": false
},
"only_streams": {
"description": "List of stream names to include in the scenario (if specified, only these streams will be tested)",
"type": "array",
"items": {
"type": "string"
}
},
"exclude_streams": {
"description": "List of stream names to exclude from the scenario",
"type": "array",
"items": {
"type": "string"
}
},
"suggested_streams_only": {
"description": "Whether to limit testing to the connector's suggested streams list (from data.suggestedStreams)",
"type": "boolean",
"default": false
},
"configured_catalog_path": {
"description": "Path to a pre-configured catalog file for the scenario",
"type": "string"
}
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,40 @@ class Config:
id: str = Field(..., description="The connection ID")


class SmokeTestScenario(BaseModel):
class Config:
extra = Extra.forbid

name: str = Field(
...,
description="Name of the test scenario (e.g., 'default', 'invalid_config', 'oauth_config')",
)
config_file: Optional[str] = Field(
None, description="Relative path to the config file to use for this scenario"
)
config_settings: Optional[Dict[str, Any]] = Field(
None,
description="Optional dictionary of config settings to override or supplement config_file settings",
)
expect_failure: Optional[bool] = Field(
False, description="Whether the scenario is expected to fail"
)
only_streams: Optional[List[str]] = Field(
None,
description="List of stream names to include in the scenario (if specified, only these streams will be tested)",
)
exclude_streams: Optional[List[str]] = Field(
None, description="List of stream names to exclude from the scenario"
)
suggested_streams_only: Optional[bool] = Field(
False,
description="Whether to limit testing to the connector's suggested streams list (from data.suggestedStreams)",
)
configured_catalog_path: Optional[str] = Field(
None, description="Path to a pre-configured catalog file for the scenario"
)


class ReleaseStage(BaseModel):
__root__: Literal["alpha", "beta", "generally_available", "custom"] = Field(
...,
Expand Down Expand Up @@ -278,16 +312,20 @@ class ConnectorTestSuiteOptions(BaseModel):
class Config:
extra = Extra.forbid

suite: Literal["unitTests", "integrationTests", "acceptanceTests", "liveTests"] = (
Field(..., description="Name of the configured test suite")
)
suite: Literal[
"unitTests", "integrationTests", "acceptanceTests", "liveTests", "smokeTests"
] = Field(..., description="Name of the configured test suite")
testSecrets: Optional[List[Secret]] = Field(
None, description="List of secrets required to run the test suite"
)
testConnections: Optional[List[TestConnections]] = Field(
None,
description="List of sandbox cloud connections that tests can be run against",
)
scenarios: Optional[List[SmokeTestScenario]] = Field(
None,
description="List of smoke test scenarios (only applicable when suite is 'smokeTests')",
)


class ActorDefinitionResourceRequirements(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from __future__ import annotations

from typing import List, Literal, Optional
from typing import Any, Dict, List, Literal, Optional

from pydantic import BaseModel, Extra, Field

Expand All @@ -29,6 +29,40 @@ class Config:
id: str = Field(..., description="The connection ID")


class SmokeTestScenario(BaseModel):
class Config:
extra = Extra.forbid

name: str = Field(
...,
description="Name of the test scenario (e.g., 'default', 'invalid_config', 'oauth_config')",
)
config_file: Optional[str] = Field(
None, description="Relative path to the config file to use for this scenario"
)
config_settings: Optional[Dict[str, Any]] = Field(
None,
description="Optional dictionary of config settings to override or supplement config_file settings",
)
expect_failure: Optional[bool] = Field(
False, description="Whether the scenario is expected to fail"
)
only_streams: Optional[List[str]] = Field(
None,
description="List of stream names to include in the scenario (if specified, only these streams will be tested)",
)
exclude_streams: Optional[List[str]] = Field(
None, description="List of stream names to exclude from the scenario"
)
suggested_streams_only: Optional[bool] = Field(
False,
description="Whether to limit testing to the connector's suggested streams list (from data.suggestedStreams)",
)
configured_catalog_path: Optional[str] = Field(
None, description="Path to a pre-configured catalog file for the scenario"
)


class Secret(BaseModel):
class Config:
extra = Extra.forbid
Expand All @@ -45,13 +79,17 @@ class ConnectorTestSuiteOptions(BaseModel):
class Config:
extra = Extra.forbid

suite: Literal["unitTests", "integrationTests", "acceptanceTests", "liveTests"] = (
Field(..., description="Name of the configured test suite")
)
suite: Literal[
"unitTests", "integrationTests", "acceptanceTests", "liveTests", "smokeTests"
] = Field(..., description="Name of the configured test suite")
testSecrets: Optional[List[Secret]] = Field(
None, description="List of secrets required to run the test suite"
)
testConnections: Optional[List[TestConnections]] = Field(
None,
description="List of sandbox cloud connections that tests can be run against",
)
scenarios: Optional[List[SmokeTestScenario]] = Field(
None,
description="List of smoke test scenarios (only applicable when suite is 'smokeTests')",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# generated by datamodel-codegen:
# filename: SmokeTestScenario.yaml

from __future__ import annotations

from typing import Any, Dict, List, Optional

from pydantic import BaseModel, Extra, Field


class SmokeTestScenario(BaseModel):
class Config:
extra = Extra.forbid

name: str = Field(
...,
description="Name of the test scenario (e.g., 'default', 'invalid_config', 'oauth_config')",
)
config_file: Optional[str] = Field(
None, description="Relative path to the config file to use for this scenario"
)
config_settings: Optional[Dict[str, Any]] = Field(
None,
description="Optional dictionary of config settings to override or supplement config_file settings",
)
expect_failure: Optional[bool] = Field(
False, description="Whether the scenario is expected to fail"
)
only_streams: Optional[List[str]] = Field(
None,
description="List of stream names to include in the scenario (if specified, only these streams will be tested)",
)
exclude_streams: Optional[List[str]] = Field(
None, description="List of stream names to exclude from the scenario"
)
suggested_streams_only: Optional[bool] = Field(
False,
description="Whether to limit testing to the connector's suggested streams list (from data.suggestedStreams)",
)
configured_catalog_path: Optional[str] = Field(
None, description="Path to a pre-configured catalog file for the scenario"
)
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from .RolloutConfiguration import *
from .Secret import *
from .SecretStore import *
from .SmokeTestScenario import *
from .SourceFileInfo import *
from .SuggestedStreams import *
from .SupportLevel import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ properties:
- "integrationTests"
- "acceptanceTests"
- "liveTests"
- "smokeTests"
testSecrets:
description: "List of secrets required to run the test suite"
type: array
Expand All @@ -26,3 +27,8 @@ properties:
type: array
items:
"$ref": "TestConnections.yaml"
scenarios:
description: "List of smoke test scenarios (only applicable when suite is 'smokeTests')"
type: array
items:
"$ref": "SmokeTestScenario.yaml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
"$schema": http://json-schema.org/draft-07/schema#
"$id": https://github.com/airbytehq/airbyte/airbyte-ci/connectors/metadata_service/lib/metadata_service/models/src/SmokeTestScenario.yaml
title: SmokeTestScenario
description: A single smoke test scenario configuration for a connector.
type: object
required:
- name
additionalProperties: false
properties:
name:
description: "Name of the test scenario (e.g., 'default', 'invalid_config', 'oauth_config')"
type: string
config_file:
description: "Relative path to the config file to use for this scenario"
type: string
config_settings:
description: "Optional dictionary of config settings to override or supplement config_file settings"
type: object
additionalProperties: true
expect_failure:
description: "Whether the scenario is expected to fail"
type: boolean
default: false
only_streams:
description: "List of stream names to include in the scenario (if specified, only these streams will be tested)"
type: array
items:
type: string
exclude_streams:
description: "List of stream names to exclude from the scenario"
type: array
items:
type: string
suggested_streams_only:
description: "Whether to limit testing to the connector's suggested streams list (from data.suggestedStreams)"
type: boolean
default: false
configured_catalog_path:
description: "Path to a pre-configured catalog file for the scenario"
type: string
Loading