Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update-testcase
  • Loading branch information
ChenxiJiang333 committed Oct 30, 2024
commit 24c30490864984dddcb89d2345a2a0a1b8b1f6f6
6 changes: 4 additions & 2 deletions sdk/redhatopenshift/azure-mgmt-redhatopenshift/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Release History

## 0.0.0(it should be stable) (2024-10-30)

## 2.0.0 (2024-10-30)

### Breaking Changes

- This package now only targets the latest Api-Version available on Azure and removes APIs of other Api-Version. After this change, the package can have much smaller size. If your application requires a specific and non-latest Api-Version, it's recommended to pin this package to the previous released version; If your application always only use latest Api-Version, please ingore this change.
-
## 1.5.0 (2024-07-22)

### Features Added
Expand Down
7 changes: 0 additions & 7 deletions sdk/redhatopenshift/azure-mgmt-redhatopenshift/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,4 @@
],
"autorest_command": "autorest specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-2023-11 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/readme.md",
"package-2020-04-30": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2020-04-30/redhatopenshift.json",
"package-2021-09-01-preview": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 preview/2021-09-01-preview/redhatopenshift.json",
"package-2022-04-01": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2022-04-01/redhatopenshift.json",
"package-2022-09-04": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2022-09-04/redhatopenshift.json",
"package-2023-04-01": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2023-04-01/redhatopenshift.json",
"package-2023-09-04": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2023-09-04/redhatopenshift.json",
"package-2023-11": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2023-11-22/redhatopenshift.json"
}
6 changes: 0 additions & 6 deletions sdk/redhatopenshift/azure-mgmt-redhatopenshift/assets.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "0.0.0"
VERSION = "2.0.0"
8 changes: 5 additions & 3 deletions sdk/redhatopenshift/azure-mgmt-redhatopenshift/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@

# Version extraction inspired from 'requests'
with open(
os.path.join(package_folder_path, "version.py")
if os.path.exists(os.path.join(package_folder_path, "version.py"))
else os.path.join(package_folder_path, "_version.py"),
(
os.path.join(package_folder_path, "version.py")
if os.path.exists(os.path.join(package_folder_path, "version.py"))
else os.path.join(package_folder_path, "_version.py")
),
"r",
) as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,23 @@
AZURE_LOCATION = "eastus"



@pytest.mark.live_test_only
class TestAzureRedHatOpenShift4OpenShiftClustersOperationsAsync(AzureMgmtRecordedTestCase):
def setup_method(self, method):
self.client = self.create_mgmt_client(AzureRedHatOpenShiftClient, is_async=True)

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list(self, resource_group):
response = self.client.open_shift_clusters.list(
api_version="2023-11-22",
)
response = self.client.open_shift_clusters.list()
result = [r async for r in response]
assert response


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list_by_resource_group(self, resource_group):
response = self.client.open_shift_clusters.list_by_resource_group(
resource_group_name=resource_group.name,
api_version="2023-11-22",
)
result = [r async for r in response]
assert result == []

Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,23 @@
AZURE_LOCATION = "eastus"



@pytest.mark.live_test_only
class TestAzureRedHatOpenShift4OpenShiftClustersOperations(AzureMgmtRecordedTestCase):
def setup_method(self, method):
self.client = self.create_mgmt_client(AzureRedHatOpenShiftClient)

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list(self, resource_group):
response = self.client.open_shift_clusters.list(
api_version="2023-11-22",
)
response = self.client.open_shift_clusters.list()
result = [r for r in response]
assert response


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_by_resource_group(self, resource_group):
response = self.client.open_shift_clusters.list_by_resource_group(
resource_group_name=resource_group.name,
api_version="2023-11-22",
)
result = [r for r in response]
assert result == []

Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@
AZURE_LOCATION = "eastus"



@pytest.mark.live_test_only
class TestAzureRedHatOpenShift4OperationsAsync(AzureMgmtRecordedTestCase):
def setup_method(self, method):
self.client = self.create_mgmt_client(AzureRedHatOpenShiftClient, is_async=True)

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list(self, resource_group):
response = self.client.operations.list(
api_version="2023-11-22",
)
response = self.client.operations.list()
result = [r async for r in response]
assert result

Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@
AZURE_LOCATION = "eastus"



@pytest.mark.live_test_only
class TestAzureRedHatOpenShift4Operations(AzureMgmtRecordedTestCase):
def setup_method(self, method):
self.client = self.create_mgmt_client(AzureRedHatOpenShiftClient)

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list(self, resource_group):
response = self.client.operations.list(
api_version="2023-11-22",
)
response = self.client.operations.list()
result = [r for r in response]
assert result