Skip to content

Commit

Permalink
drop test with unencrypted key in secret: true
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd committed Apr 10, 2021
1 parent a483888 commit d67b3c9
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions st2common/tests/unit/test_config_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ def test_get_config_dynamic_config_item_under_additional_properties(self):
pack_name = "dummy_pack_schema_with_additional_properties_1"
loader = ContentPackConfigLoader(pack_name=pack_name)

KeyValuePair.add_or_update(KeyValuePairDB(name="k0", value="v0"))
KeyValuePair.add_or_update(
KeyValuePairDB(name="k1_encrypted", value="v1_encrypted", secret=True)
)
Expand All @@ -535,18 +534,13 @@ def test_get_config_dynamic_config_item_under_additional_properties(self):
# no host or port to test default value
"token": "hard-coded-secret",
},
"stage": {
"host": "127.0.0.1",
"port": 8181,
# unencrypted in datastore
"token": "{{st2kv.system.k0}}",
},
"prod": {
"host": "127.1.2.7",
"port": 8282,
# encrypted in datastore
# (schema declares `secret: true` which triggers auto-decryption)
"token": "{{st2kv.system.k1_encrypted}}",
# schema declares `secret: true` which triggers auto-decryption.
# If this were not encrypted, it would try to decrypt it and fail.
},
}
}
Expand All @@ -565,11 +559,6 @@ def test_get_config_dynamic_config_item_under_additional_properties(self):
"port": 8080,
"token": "hard-coded-secret",
},
"stage": {
"host": "127.0.0.1",
"port": 8181,
"token": "v0",
},
"prod": {
"host": "127.1.2.7",
"port": 8282,
Expand Down

0 comments on commit d67b3c9

Please sign in to comment.