Skip to content

Commit d67b3c9

Browse files
committed
drop test with unencrypted key in secret: true
1 parent a483888 commit d67b3c9

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

st2common/tests/unit/test_config_loader.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,6 @@ def test_get_config_dynamic_config_item_under_additional_properties(self):
522522
pack_name = "dummy_pack_schema_with_additional_properties_1"
523523
loader = ContentPackConfigLoader(pack_name=pack_name)
524524

525-
KeyValuePair.add_or_update(KeyValuePairDB(name="k0", value="v0"))
526525
KeyValuePair.add_or_update(
527526
KeyValuePairDB(name="k1_encrypted", value="v1_encrypted", secret=True)
528527
)
@@ -535,18 +534,13 @@ def test_get_config_dynamic_config_item_under_additional_properties(self):
535534
# no host or port to test default value
536535
"token": "hard-coded-secret",
537536
},
538-
"stage": {
539-
"host": "127.0.0.1",
540-
"port": 8181,
541-
# unencrypted in datastore
542-
"token": "{{st2kv.system.k0}}",
543-
},
544537
"prod": {
545538
"host": "127.1.2.7",
546539
"port": 8282,
547540
# encrypted in datastore
548-
# (schema declares `secret: true` which triggers auto-decryption)
549541
"token": "{{st2kv.system.k1_encrypted}}",
542+
# schema declares `secret: true` which triggers auto-decryption.
543+
# If this were not encrypted, it would try to decrypt it and fail.
550544
},
551545
}
552546
}
@@ -565,11 +559,6 @@ def test_get_config_dynamic_config_item_under_additional_properties(self):
565559
"port": 8080,
566560
"token": "hard-coded-secret",
567561
},
568-
"stage": {
569-
"host": "127.0.0.1",
570-
"port": 8181,
571-
"token": "v0",
572-
},
573562
"prod": {
574563
"host": "127.1.2.7",
575564
"port": 8282,

0 commit comments

Comments
 (0)