Skip to content

Commit

Permalink
fix(sct_config): define SCT_AWS_ACCOUNT_ID in SCTConfiguration
Browse files Browse the repository at this point in the history
Environmental variable SCT_AWS_ACCOUNT_ID is used in aws_okta.py:

`account_id = os.environ.get('SCT_AWS_ACCOUNT_ID', '797456418907')`

The fact it's not defined in sct_config.py fails SCT test execution
for non-default AWS account, ID of which is passed as env variable:

`ValueError: Unsupported environment variables were used: -
 SCT_AWS_ACCOUNT_ID=400694452550`

The described above case is relevant for SCT tests with the cluster
created in Scylla Cloud.
  • Loading branch information
mikliapko authored and fruch committed Dec 15, 2024
1 parent e07010b commit 24ac0dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/configuration_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,3 +391,4 @@
| **<a href="#user-content-use_zero_nodes" name="use_zero_nodes">use_zero_nodes</a>** | If True, enable support in sct of zero nodes(configuration, nemesis) | N/A | SCT_USE_ZERO_NODES
| **<a href="#user-content-n_db_zero_token_nodes" name="n_db_zero_token_nodes">n_db_zero_token_nodes</a>** | Number of zero token nodes in cluster. Value should be set as "0 1 1"<br>for multidc configuration in same manner as 'n_db_nodes' and should be equal<br>number of regions | N/A | SCT_N_DB_ZERO_TOKEN_NODES
| **<a href="#user-content-zero_token_instance_type_db" name="zero_token_instance_type_db">zero_token_instance_type_db</a>** | Instance type for zero token node | i4i.large | SCT_ZERO_TOKEN_INSTANCE_TYPE_DB
| **<a href="#user-content-sct_aws_account_id" name="sct_aws_account_id">sct_aws_account_id</a>** | AWS account id on behalf of which the test is run | N/A | SCT_AWS_ACCOUNT_ID
3 changes: 3 additions & 0 deletions sdcm/sct_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,9 @@ class SCTConfiguration(dict):
dict(name="zero_token_instance_type_db", env="SCT_ZERO_TOKEN_INSTANCE_TYPE_DB", type=str,
help="""Instance type for zero token node"""),

dict(name="sct_aws_account_id", env="SCT_AWS_ACCOUNT_ID", type=str,
help="AWS account id on behalf of which the test is run"),

]

required_params = ['cluster_backend', 'test_duration', 'n_db_nodes', 'n_loaders', 'use_preinstalled_scylla',
Expand Down

0 comments on commit 24ac0dd

Please sign in to comment.