diff options
author | Alexei Znamensky <103110+russoz@users.noreply.github.com> | 2021-03-02 04:40:38 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 10:40:38 -0500 |
commit | 920b68f5f25adda201549e46afdb8d6282eb1871 (patch) | |
tree | da5c799ac9d6d5bdb4d53c7e29afe7775ea04b19 /test/units/utils | |
parent | e804fccf1c3fc94f35fac42ec8980eea0b431aa6 (diff) | |
download | ansible-920b68f5f25adda201549e46afdb8d6282eb1871.tar.gz |
Fixed/improved regular expresssion for collection names (#73577)
* added changelog fragment
* added a couple of tests to coll name validation
Diffstat (limited to 'test/units/utils')
-rw-r--r-- | test/units/utils/collection_loader/test_collection_loader.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/units/utils/collection_loader/test_collection_loader.py b/test/units/utils/collection_loader/test_collection_loader.py index c8187676e6..425f770c77 100644 --- a/test/units/utils/collection_loader/test_collection_loader.py +++ b/test/units/utils/collection_loader/test_collection_loader.py @@ -722,6 +722,7 @@ def test_fqcr_parsing_valid(ref, ref_type, expected_collection, ('fqcn', 'expected'), ( ('ns1.coll2', True), + ('ns1#coll2', False), ('def.coll3', False), ('ns4.return', False), ('assert.this', False), @@ -742,6 +743,7 @@ def test_fqcn_validation(fqcn, expected): [ ('no_dots_at_all_action', 'action', ValueError, 'is not a valid collection reference'), ('no_nscoll.myaction', 'action', ValueError, 'is not a valid collection reference'), + ('no_nscoll%myaction', 'action', ValueError, 'is not a valid collection reference'), ('ns.coll.myaction', 'bogus', ValueError, 'invalid collection ref_type'), ]) def test_fqcr_parsing_invalid(ref, ref_type, expected_error_type, expected_error_expression): |