Skip to content

[Test] In test_fsx_lustre_dra, remove unnecessary update of DRA1 that may cause cluster update failure. #6649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 3 additions & 1 deletion cli/src/pcluster/config/cluster_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
DefaultUserHomeType,
)
from pcluster.config.common import Imds as TopLevelImds
from pcluster.config.common import Resource
from pcluster.config.common import (
Resource,
)
from pcluster.constants import (
CIDR_ALL_IPS,
CW_ALARMS_ENABLED_DEFAULT,
Expand Down
8 changes: 5 additions & 3 deletions cli/tests/pcluster/cli/test_describe_cluster_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# or in the "LICENSE.txt" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
# limitations under the License.
import re

import pytest
from assertpy import assert_that

Expand All @@ -24,8 +26,8 @@ def test_helper(self, test_datadir, run_cli, assert_out_err):
(["--cluster-name", "cluster", "--invalid"], "Invalid arguments ['--invalid']"),
(
["--cluster-name", "cluster", "--node-type", "invalid"],
"error: argument --node-type: invalid choice: 'invalid' (choose from 'HeadNode', 'ComputeNode', "
"'LoginNode')",
r"error: argument --node-type: invalid choice: 'invalid' \(choose from .*HeadNode.*, .*ComputeNode.*, "
r".*LoginNode.*\)",
),
(
["--cluster-name", "cluster", "--region", "eu-west-"],
Expand All @@ -38,4 +40,4 @@ def test_invalid_args(self, args, error_message, run_cli, capsys):
run_cli(command, expect_failure=True)

out, err = capsys.readouterr()
assert_that(out + err).contains(error_message)
assert_that(re.search(error_message, out + err) or error_message in out + err).is_true()
7 changes: 5 additions & 2 deletions cli/tests/pcluster/cli/test_list_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# or in the "LICENSE.txt" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
# limitations under the License.
import re

import pytest
from assertpy import assert_that

Expand Down Expand Up @@ -33,7 +35,8 @@ def test_helper(self, test_datadir, run_cli, assert_out_err):
),
(
["--image-status", "invalid"],
"argument --image-status: invalid choice: 'invalid' (choose from 'AVAILABLE', 'PENDING', 'FAILED')",
r"argument --image-status: invalid choice: 'invalid' "
r"\(choose from .*AVAILABLE.*, .*PENDING.*, .*FAILED.*\)",
),
(
["--image-status", "AVAILABLE", "--invalid"],
Expand All @@ -50,7 +53,7 @@ def test_invalid_args(self, args, error_message, run_cli, capsys):
run_cli(command, expect_failure=True)

out, err = capsys.readouterr()
assert_that(out + err).contains(error_message)
assert_that(re.search(error_message, out + err) or error_message in out + err).is_true()

def test_execute(self, mocker):
response_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/integration-tests/tests/storage/test_fsx_lustre.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def test_fsx_lustre_dra(

check_dra(cluster, region, 1, "test1", mount_dir)

# Add a second DRA and modify a parameter of the first DRA
# Add a second DRA
cluster_update_config = pcluster_config_reader(
config_file="pcluster.config.update.yaml",
mount_dir=mount_dir,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ SharedStorage:
FileSystemPath: /test1
ImportedFileChunkSize: 1024
AutoExportPolicy: [ NEW, CHANGED, DELETED ]
AutoImportPolicy: [ NEW, CHANGED ]
- Name: dra_2
BatchImportMetaDataOnCreate: True
DataRepositoryPath: s3://{{ bucket_name }}/test2
Expand Down
Loading