Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 650acb4

Browse files
committed
update bookstore acceptance test
1 parent 5756df5 commit 650acb4

7 files changed

Lines changed: 73 additions & 18 deletions

File tree

localstack-core/localstack/services/opensearch/provider.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
CognitoOptions,
2727
CognitoOptionsStatus,
2828
ColdStorageOptions,
29+
CompatibleVersionsMap,
2930
CreateDomainRequest,
3031
CreateDomainResponse,
3132
DeleteDomainResponse,
@@ -650,6 +651,10 @@ def get_compatible_versions(
650651
for comp in versions.compatible_versions
651652
if comp["SourceVersion"] == version_filter
652653
]
654+
if not compatible_versions:
655+
compatible_versions = [
656+
CompatibleVersionsMap(SourceVersion=version_filter, TargetVersions=[])
657+
]
653658
return GetCompatibleVersionsResponse(CompatibleVersions=compatible_versions)
654659

655660
def describe_domain_config(

tests/aws/cdk_templates/Bookstore/BookstoreStack.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
"EncryptionAtRestOptions": {
203203
"Enabled": false
204204
},
205-
"EngineVersion": "OpenSearch_2.11",
205+
"EngineVersion": "OpenSearch_3.1",
206206
"LogPublishingOptions": {},
207207
"NodeToNodeEncryptionOptions": {
208208
"Enabled": false
@@ -281,7 +281,7 @@
281281
"Arn"
282282
]
283283
},
284-
"Runtime": "nodejs16.x"
284+
"Runtime": "nodejs22.x"
285285
},
286286
"DependsOn": [
287287
"BooksApiLambdaRoleDefaultPolicyCB8FFCFD",
@@ -308,7 +308,7 @@
308308
"Arn"
309309
]
310310
},
311-
"Runtime": "nodejs16.x"
311+
"Runtime": "nodejs22.x"
312312
},
313313
"DependsOn": [
314314
"BooksApiLambdaRoleDefaultPolicyCB8FFCFD",
@@ -335,7 +335,7 @@
335335
"Arn"
336336
]
337337
},
338-
"Runtime": "nodejs16.x"
338+
"Runtime": "nodejs22.x"
339339
},
340340
"DependsOn": [
341341
"BooksApiLambdaRoleDefaultPolicyCB8FFCFD",

tests/aws/scenario/bookstore/test_bookstore.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ def _verify_search(category: str, expected_amount: int):
287287
"$..ClusterConfig.DedicatedMasterType", # added in LS
288288
"$..ClusterConfig.Options.DedicatedMasterCount", # added in LS
289289
"$..ClusterConfig.Options.DedicatedMasterType", # added in LS
290+
"$..DomainStatusList..AIMLOptions", # missing
290291
"$..DomainStatusList..EBSOptions.Iops", # added in LS
292+
"$..DomainStatusList..IdentityCenterOptions", # missing
291293
"$..DomainStatusList..IPAddressType", # missing
292294
"$..DomainStatusList..DomainProcessingStatus", # missing
293295
"$..DomainStatusList..ModifyingProperties", # missing
@@ -299,7 +301,9 @@ def _verify_search(category: str, expected_amount: int):
299301
"$..ClusterConfig.MultiAZWithStandbyEnabled", # missing
300302
"$..AdvancedSecurityOptions.AnonymousAuthEnabled", # missing
301303
"$..AdvancedSecurityOptions.Options.AnonymousAuthEnabled", # missing
304+
"$..DomainConfig.AIMLOptions", # missing
302305
"$..DomainConfig.ClusterConfig.Options.WarmEnabled", # missing
306+
"$..DomainConfig.IdentityCenterOptions", # missing
303307
"$..DomainConfig.IPAddressType", # missing
304308
"$..DomainConfig.ModifyingProperties", # missing
305309
"$..ClusterConfig.Options.ColdStorageOptions", # missing

tests/aws/scenario/bookstore/test_bookstore.snapshot.json

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -549,11 +549,20 @@
549549
}
550550
},
551551
"tests/aws/scenario/bookstore/test_bookstore.py::TestBookstoreApplication::test_opensearch_crud": {
552-
"recorded-date": "15-07-2024, 12:55:29",
552+
"recorded-date": "12-09-2025, 09:51:48",
553553
"recorded-content": {
554554
"describe_domains": {
555555
"DomainStatusList": [
556556
{
557+
"AIMLOptions": {
558+
"NaturalLanguageQueryGenerationOptions": {
559+
"CurrentState": "NOT_ENABLED",
560+
"DesiredState": "DISABLED"
561+
},
562+
"S3VectorsEngine": {
563+
"Enabled": false
564+
}
565+
},
557566
"ARN": "arn:<partition>:es:<region>:111111111111:domain/<domain-name:1>",
558567
"AccessPolicies": "",
559568
"AdvancedOptions": {
@@ -609,8 +618,9 @@
609618
"Enabled": false
610619
},
611620
"Endpoint": "<endpoint:1>",
612-
"EngineVersion": "OpenSearch_2.11",
621+
"EngineVersion": "OpenSearch_3.1",
613622
"IPAddressType": "ipv4",
623+
"IdentityCenterOptions": {},
614624
"ModifyingProperties": [],
615625
"NodeToNodeEncryptionOptions": {
616626
"Enabled": false
@@ -628,7 +638,7 @@
628638
"ServiceSoftwareOptions": {
629639
"AutomatedUpdateDate": "datetime",
630640
"Cancellable": false,
631-
"CurrentVersion": "OpenSearch_2_11_R20240502-P2",
641+
"CurrentVersion": "OpenSearch_3_1_R20250904-P1",
632642
"Description": "There is no software update available for this domain.",
633643
"NewVersion": "",
634644
"OptionalDeployment": true,
@@ -663,6 +673,24 @@
663673
},
664674
"describe_domain_config": {
665675
"DomainConfig": {
676+
"AIMLOptions": {
677+
"Options": {
678+
"NaturalLanguageQueryGenerationOptions": {
679+
"CurrentState": "NOT_ENABLED",
680+
"DesiredState": "DISABLED"
681+
},
682+
"S3VectorsEngine": {
683+
"Enabled": false
684+
}
685+
},
686+
"Status": {
687+
"CreationDate": "datetime",
688+
"PendingDeletion": false,
689+
"State": "Active",
690+
"UpdateDate": "datetime",
691+
"UpdateVersion": "update-version"
692+
}
693+
},
666694
"AccessPolicies": {
667695
"Options": "",
668696
"Status": {
@@ -795,7 +823,7 @@
795823
}
796824
},
797825
"EngineVersion": {
798-
"Options": "OpenSearch_2.11",
826+
"Options": "OpenSearch_3.1",
799827
"Status": {
800828
"CreationDate": "datetime",
801829
"PendingDeletion": false,
@@ -814,6 +842,16 @@
814842
"UpdateVersion": "update-version"
815843
}
816844
},
845+
"IdentityCenterOptions": {
846+
"Options": {},
847+
"Status": {
848+
"CreationDate": "datetime",
849+
"PendingDeletion": false,
850+
"State": "Active",
851+
"UpdateDate": "datetime",
852+
"UpdateVersion": "update-version"
853+
}
854+
},
817855
"LogPublishingOptions": {
818856
"Options": {},
819857
"Status": {
@@ -926,10 +964,8 @@
926964
"get_compatible_versions": {
927965
"CompatibleVersions": [
928966
{
929-
"SourceVersion": "OpenSearch_2.11",
930-
"TargetVersions": [
931-
"OpenSearch_2.13"
932-
]
967+
"SourceVersion": "OpenSearch_3.1",
968+
"TargetVersions": []
933969
}
934970
],
935971
"ResponseMetadata": {
@@ -939,6 +975,10 @@
939975
},
940976
"list_versions": {
941977
"Versions": [
978+
"OpenSearch_3.1",
979+
"OpenSearch_2.19",
980+
"OpenSearch_2.17",
981+
"OpenSearch_2.15",
942982
"OpenSearch_2.13",
943983
"OpenSearch_2.11",
944984
"OpenSearch_2.9",

tests/aws/scenario/bookstore/test_bookstore.validation.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
"last_validated_date": "2024-07-15T12:54:17+00:00"
44
},
55
"tests/aws/scenario/bookstore/test_bookstore.py::TestBookstoreApplication::test_opensearch_crud": {
6-
"last_validated_date": "2024-07-15T12:55:29+00:00"
6+
"last_validated_date": "2025-09-12T10:07:07+00:00",
7+
"durations_in_seconds": {
8+
"setup": 1157.65,
9+
"call": 3.36,
10+
"teardown": 919.26,
11+
"total": 2080.27
12+
}
713
},
814
"tests/aws/scenario/bookstore/test_bookstore.py::TestBookstoreApplication::test_search_books": {
915
"last_validated_date": "2024-07-15T12:55:25+00:00"

tests/aws/services/opensearch/test_opensearch.snapshot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"tests/aws/services/opensearch/test_opensearch.py::TestOpensearchProvider::test_get_compatible_versions": {
3-
"recorded-date": "12-09-2025, 07:49:30",
3+
"recorded-date": "12-09-2025, 10:51:06",
44
"recorded-content": {
55
"source_versions": [
66
"Elasticsearch_5.1",

tests/aws/services/opensearch/test_opensearch.validation.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
}
1010
},
1111
"tests/aws/services/opensearch/test_opensearch.py::TestOpensearchProvider::test_get_compatible_versions": {
12-
"last_validated_date": "2025-09-12T07:49:30+00:00",
12+
"last_validated_date": "2025-09-12T10:51:06+00:00",
1313
"durations_in_seconds": {
14-
"setup": 0.69,
15-
"call": 0.81,
14+
"setup": 0.8,
15+
"call": 0.82,
1616
"teardown": 0.01,
17-
"total": 1.51
17+
"total": 1.63
1818
}
1919
},
2020
"tests/aws/services/opensearch/test_opensearch.py::TestOpensearchProvider::test_list_versions": {

0 commit comments

Comments
 (0)