Skip to content

Commit aaa2bd8

Browse files
committed
Rename all appareances of components to resources
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
1 parent 6393cc6 commit aaa2bd8

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

tests/integration/conftest.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class DaprTestEnvironment:
2727
class returns real DaprClient instances so tests can make assertions against SDK return values.
2828
"""
2929

30-
def __init__(self, default_components: Path = RESOURCES_DIR) -> None:
31-
self._default_components = default_components
30+
def __init__(self, default_resources: Path = RESOURCES_DIR) -> None:
31+
self._default_resources = default_resources
3232
self._processes: list[subprocess.Popen[str]] = []
3333
self._clients: list[DaprClient] = []
3434

@@ -40,7 +40,7 @@ def start_sidecar(
4040
http_port: int = 3500,
4141
app_port: int | None = None,
4242
app_cmd: str | None = None,
43-
components: Path | None = None,
43+
resources: Path | None = None,
4444
) -> DaprClient:
4545
"""Start a Dapr sidecar and return a connected DaprClient.
4646
@@ -50,10 +50,10 @@ def start_sidecar(
5050
http_port: Sidecar HTTP port (also used for the SDK health check).
5151
app_port: Port the app listens on (implies ``--app-protocol grpc``).
5252
app_cmd: Shell command to start alongside the sidecar.
53-
components: Path to component YAML directory. Defaults to
54-
``tests/integration/components/``.
53+
resources: Path to resource YAML directory. Defaults to
54+
``tests/integration/resources/``.
5555
"""
56-
resources = components or self._default_components
56+
resources = resources or self._default_resources
5757

5858
cmd = [
5959
'dapr',
@@ -160,8 +160,8 @@ def _isolate_dapr_settings() -> Iterator[None]:
160160
``dapr/clients/http/helpers.py``):
161161
162162
- ``DAPR_HTTP_ENDPOINT``, if set, wins and bypasses host/port entirely.
163-
- ``DAPR_RUNTIME_HOST`` is the host component of the fallback URL.
164-
- ``DAPR_HTTP_PORT`` is the port component of the fallback URL.
163+
- ``DAPR_RUNTIME_HOST`` is the host resource of the fallback URL.
164+
- ``DAPR_HTTP_PORT`` is the port resource of the fallback URL.
165165
166166
Any of these may be populated from the developer's environment (the Dapr
167167
CLI sets them); without an override the SDK health check could target the
@@ -200,7 +200,7 @@ def dapr_env() -> Generator[DaprTestEnvironment, Any, None]:
200200

201201
@pytest.fixture
202202
def wait_until() -> Callable[..., Any]:
203-
"""Returns the ``_wait_until(predicate, timeout=10, interval=0.1)`` helper."""
203+
"""Returns the ``_wait_until(condition, timeout=10, interval=0.1)`` helper."""
204204
return _wait_until
205205

206206

@@ -210,5 +210,5 @@ def apps_dir() -> Path:
210210

211211

212212
@pytest.fixture(scope='module')
213-
def components_dir() -> Path:
213+
def resources_dir() -> Path:
214214
return RESOURCES_DIR

tests/integration/test_secret_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55

66
@pytest.fixture(scope='module')
7-
def client(dapr_env, components_dir):
8-
return dapr_env.start_sidecar(app_id='test-secret', components=components_dir)
7+
def client(dapr_env, resources_dir):
8+
return dapr_env.start_sidecar(app_id='test-secret', resources=resources_dir)
99

1010

1111
def test_get_secret(client):

0 commit comments

Comments
 (0)