File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1 Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -762,7 +762,21 @@ def test_get_config_dynamic_config_item_under_additional_items(self):
762762 # schema declares `secret: true` which triggers auto-decryption.
763763 # If this were not encrypted, it would try to decrypt it and fail.
764764 },
765- ]
765+ ],
766+ # foobar has additionalItems: true
767+ "foobar" : [
768+ # there are no types to validate here
769+ 5 ,
770+ "a string" ,
771+ {
772+ # there are no defaults to interpolate here
773+ "token" : "hard-coded-secret" ,
774+ },
775+ {
776+ # nothing is marked `secret: true` so no auto-decryption occurs.
777+ "token" : "{{st2kv.system.k1_encrypted|decrypt_kv}}" ,
778+ },
779+ ],
766780 }
767781 config_db = ConfigDB (pack = pack_name , values = values )
768782 config_db = Config .add_or_update (config_db )
@@ -785,6 +799,17 @@ def test_get_config_dynamic_config_item_under_additional_items(self):
785799 "token" : "v1_encrypted" ,
786800 },
787801 ],
802+ "foobar" : [
803+ 5 ,
804+ "a string" ,
805+ {
806+ "token" : "hard-coded-secret" ,
807+ },
808+ {
809+ "token" : "v1_encrypted" ,
810+ },
811+
812+ ],
788813 },
789814 )
790815
Original file line number Diff line number Diff line change 2222 type : " string"
2323 required : true
2424 secret : true
25+ foobar :
26+ type : " array"
27+ required : false
28+ additionalItems : true
You can’t perform that action at this time.
0 commit comments