Skip to content

Commit

Permalink
[AL2023] Fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Hanwen <[email protected]>
  • Loading branch information
hanwen-pcluste committed Jun 12, 2024
1 parent 4e7c235 commit 7faf80a
Show file tree
Hide file tree
Showing 15 changed files with 125 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
The EC2 instance selected supports enhanced networking capabilities using Elastic Fabric Adapter (EFA). EFA enables you to run applications requiring high levels of inter-node communications at scale on AWS at no additional charge (https://docs.aws.amazon.com/parallelcluster/latest/ug/efa-v3.html).
Allowed values for VPC ID:
# id name number_of_subnets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
The EC2 instance selected supports enhanced networking capabilities using Elastic Fabric Adapter (EFA). EFA enables you to run applications requiring high levels of inter-node communications at scale on AWS at no additional charge (https://docs.aws.amazon.com/parallelcluster/latest/ug/efa-v3.html).
Enabling EFA requires compute instances to be placed within a Placement Group. Please specify an existing Placement Group name or leave it blank for ParallelCluster to create one.
Allowed values for VPC ID:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
The EC2 instance selected supports enhanced networking capabilities using Elastic Fabric Adapter (EFA). EFA enables you to run applications requiring high levels of inter-node communications at scale on AWS at no additional charge (https://docs.aws.amazon.com/parallelcluster/latest/ug/efa-v3.html).
Enabling EFA requires compute instances to be placed within a Placement Group. Please specify an existing Placement Group name or leave it blank for ParallelCluster to create one.
Allowed values for VPC ID:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
The EC2 instance selected supports enhanced networking capabilities using Elastic Fabric Adapter (EFA). EFA enables you to run applications requiring high levels of inter-node communications at scale on AWS at no additional charge (https://docs.aws.amazon.com/parallelcluster/latest/ug/efa-v3.html).
Enabling EFA requires compute instances to be placed within a Placement Group. Please specify an existing Placement Group name or leave it blank for ParallelCluster to create one.
ERROR: non-existent-test-pg is not an acceptable value for Placement Group name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
Allowed values for Availability Zone:
1. eu-west-1a
2. eu-west-1b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
There are no VPC for the given region. Starting automatic creation of VPC and subnets...
Allowed values for Availability Zone:
1. eu-west-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
There are no VPC for the given region. Starting automatic creation of VPC and subnets...
Allowed values for Availability Zone:
1. eu-west-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ Allowed values for Scheduler:
2. awsbatch
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu2004
4. ubuntu2204
5. rhel8
6. rocky8
7. rhel9
8. rocky9
2. alinux2023
3. centos7
4. ubuntu2004
5. ubuntu2204
6. rhel8
7. rocky8
8. rhel9
9. rocky9
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
17 changes: 13 additions & 4 deletions cli/tests/pcluster/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,14 @@ def test_generate_random_prefix():
@pytest.mark.parametrize(
"architecture, supported_oses",
[
("x86_64", ["alinux2", "centos7", "ubuntu2004", "ubuntu2204", "rhel8", "rocky8", "rhel9", "rocky9"]),
("arm64", ["alinux2", "centos7", "ubuntu2004", "ubuntu2204", "rhel8", "rocky8", "rhel9", "rocky9"]),
(
"x86_64",
["alinux2", "alinux2023", "centos7", "ubuntu2004", "ubuntu2204", "rhel8", "rocky8", "rhel9", "rocky9"],
),
(
"arm64",
["alinux2", "alinux2023", "centos7", "ubuntu2004", "ubuntu2204", "rhel8", "rocky8", "rhel9", "rocky9"],
),
],
)
def test_get_supported_os_for_architecture(architecture, supported_oses):
Expand All @@ -100,8 +106,11 @@ def test_get_supported_os_for_architecture(architecture, supported_oses):
@pytest.mark.parametrize(
"scheduler, supported_oses",
[
("slurm", ["alinux2", "centos7", "ubuntu2004", "ubuntu2204", "rhel8", "rocky8", "rhel9", "rocky9"]),
("awsbatch", ["alinux2"]),
(
"slurm",
["alinux2", "alinux2023", "centos7", "ubuntu2004", "ubuntu2204", "rhel8", "rocky8", "rhel9", "rocky9"],
),
("awsbatch", ["alinux2", "alinux2023"]),
],
)
def test_get_supported_os_for_scheduler(scheduler, supported_oses):
Expand Down

0 comments on commit 7faf80a

Please sign in to comment.