File tree Expand file tree Collapse file tree 7 files changed +182
-6
lines changed
pkg/resource/replication_group Expand file tree Collapse file tree 7 files changed +182
-6
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ func (rm *resourceManager) CustomModifyReplicationGroupSetOutput(
7676 }
7777 ko .Spec .LogDeliveryConfigurations = logDeliveryConfig
7878
79+ // Keep the value of desired for CacheNodeType.
80+ ko .Spec .CacheNodeType = r .ko .Spec .CacheNodeType
81+
7982 rm .setAnnotationsFields (r , ko )
8083 return ko , nil
8184}
Original file line number Diff line number Diff line change 1717from e2e .declarative_test_fwk import model
1818import pytest
1919import os
20+ import glob
2021from typing import Iterable , List
2122from pathlib import Path
22- from os .path import isfile , join
23+ from os .path import isfile , join , isdir
2324from acktest .resources import load_resource_file , random_suffix_name
2425
2526
@@ -34,11 +35,11 @@ def list_scenarios(scenarios_directory: Path) -> Iterable:
3435 """
3536
3637 scenarios_list = []
37- for scenario_file in sorted ( os . listdir ( scenarios_directory )):
38- scenario_file_full_path = join ( scenarios_directory , scenario_file )
39- if not isfile ( scenario_file_full_path ) or not scenario_file . endswith ( ".yaml" ) :
40- continue
41- scenarios_list . append ( pytest . param ( Path ( scenario_file_full_path ), marks = marks ( Path ( scenario_file_full_path ))))
38+ scenario_files = glob . glob ( str ( scenarios_directory ) + "/**/*.yaml" , recursive = True )
39+
40+ for scenario_file in scenario_files :
41+ scenarios_list . append ( pytest . param ( Path ( scenario_file ), marks = marks ( Path ( scenario_file ))))
42+
4243 return scenarios_list
4344
4445
File renamed without changes.
Original file line number Diff line number Diff line change 1+ id : " CMD_SCALE_DOWN"
2+ description : " Scale down CMD"
3+ resource :
4+ apiVersion : $CRD_GROUP/$CRD_VERSION
5+ kind : ReplicationGroup
6+ metadata :
7+ name : test$RANDOM_SUFFIX
8+ steps :
9+ - id : " create_CMD_replication_group"
10+ description : " Initial config"
11+ create :
12+ spec :
13+ engine : redis
14+ replicationGroupID : test$RANDOM_SUFFIX
15+ replicationGroupDescription : Scale down for CMD
16+ cacheNodeType : cache.t3.medium
17+ numNodeGroups : 1
18+ wait :
19+ status :
20+ conditions :
21+ ACK.ResourceSynced :
22+ status : " True"
23+ timeout : 2800
24+ expect :
25+ status :
26+ status : " available"
27+ - id : " scale_down"
28+ description : " Scale down to t3.micro"
29+ patch :
30+ spec :
31+ cacheNodeType : cache.t3.micro
32+ wait :
33+ status :
34+ conditions :
35+ ACK.ResourceSynced :
36+ status : " True"
37+ timeout : 5000
38+ expect :
39+ status :
40+ status : " available"
41+ - id : " delete_CMD_RG"
42+ description : " Delete cluster mode disabled replication group"
43+ delete : test$RANDOM_SUFFIX
Original file line number Diff line number Diff line change 1+ id : " CMD_SCALE_UP"
2+ description : " Scale up CMD"
3+ resource :
4+ apiVersion : $CRD_GROUP/$CRD_VERSION
5+ kind : ReplicationGroup
6+ metadata :
7+ name : test$RANDOM_SUFFIX
8+ steps :
9+ - id : " create_CMD_replication_group"
10+ description : " Initial config"
11+ create :
12+ spec :
13+ engine : redis
14+ replicationGroupID : test$RANDOM_SUFFIX
15+ replicationGroupDescription : Scale up for CMD
16+ cacheNodeType : cache.t3.micro
17+ numNodeGroups : 1
18+ wait :
19+ status :
20+ conditions :
21+ ACK.ResourceSynced :
22+ status : " True"
23+ timeout : 1800
24+ expect :
25+ status :
26+ status : " available"
27+ - id : " scale_up"
28+ description : " Scale up from t3.micro to t3.medium"
29+ patch :
30+ spec :
31+ cacheNodeType : cache.t3.medium
32+ wait :
33+ status :
34+ conditions :
35+ ACK.ResourceSynced :
36+ status : " True"
37+ timeout : 5000
38+ expect :
39+ status :
40+ status : " available"
41+ - id : " delete_CMD_RG"
42+ description : " Delete cluster mode disabled replication group"
43+ delete : test$RANDOM_SUFFIX
Original file line number Diff line number Diff line change 1+ id : " CME_SCALE_DOWN"
2+ description : " Scale Down CME"
3+ resource :
4+ apiVersion : $CRD_GROUP/$CRD_VERSION
5+ kind : ReplicationGroup
6+ metadata :
7+ name : test$RANDOM_SUFFIX
8+ steps :
9+ - id : " create_CMD_replication_group"
10+ description : " Initial config"
11+ create :
12+ spec :
13+ engine : redis
14+ replicationGroupID : test$RANDOM_SUFFIX
15+ replicationGroupDescription : Scale down CME
16+ cacheNodeType : cache.t3.medium
17+ numNodeGroups : 2
18+ wait :
19+ status :
20+ conditions :
21+ ACK.ResourceSynced :
22+ status : " True"
23+ timeout : 1800
24+ expect :
25+ status :
26+ status : " available"
27+ - id : " scale_down"
28+ description : " Scale down from t3.medium to t3.micro"
29+ patch :
30+ spec :
31+ cacheNodeType : cache.t3.micro
32+ wait :
33+ status :
34+ conditions :
35+ ACK.ResourceSynced :
36+ status : " True"
37+ timeout : 5000
38+ expect :
39+ status :
40+ status : " available"
41+ - id : " delete_CMD_RG"
42+ description : " Delete cluster mode disabled replication group"
43+ delete : test$RANDOM_SUFFIX
Original file line number Diff line number Diff line change 1+ id : " CME_SCALE_UP"
2+ description : " Scale Up CME"
3+ resource :
4+ apiVersion : $CRD_GROUP/$CRD_VERSION
5+ kind : ReplicationGroup
6+ metadata :
7+ name : test$RANDOM_SUFFIX
8+ steps :
9+ - id : " create_CMD_replication_group"
10+ description : " Initial config"
11+ create :
12+ spec :
13+ engine : redis
14+ replicationGroupID : test$RANDOM_SUFFIX
15+ replicationGroupDescription : Scale Up CME
16+ cacheNodeType : cache.t3.micro
17+ numNodeGroups : 2
18+ wait :
19+ status :
20+ conditions :
21+ ACK.ResourceSynced :
22+ status : " True"
23+ timeout : 1800
24+ expect :
25+ status :
26+ status : " available"
27+ - id : " scale_up"
28+ description : " Scale up from t3.micro to t3.medium"
29+ patch :
30+ spec :
31+ cacheNodeType : cache.t3.medium
32+ wait :
33+ status :
34+ conditions :
35+ ACK.ResourceSynced :
36+ status : " True"
37+ timeout : 5000
38+ expect :
39+ status :
40+ status : " available"
41+ - id : " delete_CMD_RG"
42+ description : " Delete cluster mode disabled replication group"
43+ delete : test$RANDOM_SUFFIX
You can’t perform that action at this time.
0 commit comments