-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADCM-6278 Added a sample implementation of the examples
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 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
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,23 @@ | ||
import pytest | ||
|
||
from adcm_aio_client import ADCMSession, Credentials | ||
from tests.integration.setup_environment import ADCMContainer | ||
|
||
pytestmark = [pytest.mark.asyncio] | ||
|
||
|
||
async def test_iteration_with_cluster(adcm_for_examples: ADCMContainer) -> None: | ||
""" | ||
Interaction with clusters: creating, deleting, getting a list of clusters using filtering, | ||
configuring cluster configuration, launching actions on the cluster and updating the cluster. | ||
""" | ||
credentials = Credentials(username="admin", password="admin") # noqa: S106 | ||
url = adcm_for_examples.url | ||
kwargs: dict = { | ||
"timeout": 10, | ||
"retry_interval": 1, | ||
"retry_attempts": 1, | ||
} | ||
async with ADCMSession(url=url, credentials=credentials, **kwargs) as client: | ||
clusters = await client.clusters.all() | ||
assert len(clusters) == 0 |