Page MenuHomeDevCentral

Detect invalid or missing properties for shellusers
ClosedPublic

Authored by dereckson on Dec 16 2019, 22:42.
Tags
None
Referenced Files
F3797170: D2125.id5358.diff
Thu, Nov 28, 09:45
F3796984: D2125.id5361.diff
Thu, Nov 28, 08:45
F3796957: D2125.id5360.diff
Thu, Nov 28, 08:34
F3796518: D2125.diff
Thu, Nov 28, 06:32
F3791587: D2125.id5358.diff
Wed, Nov 27, 12:32
Unknown Object (File)
Fri, Nov 22, 23:23
Unknown Object (File)
Fri, Nov 22, 22:47
Unknown Object (File)
Mon, Nov 18, 02:19
Subscribers

Details

Summary

This test has been added to detect a typo in user properties,
like in D2115 "ssh-keys" instead of "ssh_keys".

Test Plan

Tested with D2215 bogus and fixed versions.

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Errors
SeverityLocationCodeMessage
Error_tests/pillar/core/test_users.py:14E302flake8 E302
Error_tests/pillar/core/test_users.py:28E501flake8 E501
Error_tests/pillar/core/test_users.py:31E501flake8 E501
Error_tests/pillar/core/test_users.py:33E501flake8 E501
Unit
No Test Coverage
Branch
test-pillar-users
Build Status
Buildable 3309
Build 3558: arc lint + arc unit

Event Timeline

dereckson created this revision.
$ python -m unittest discover pillar/core
F
======================================================================
FAIL: test_users_properties (test_users.Testinstance)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/salt/nasqueron-operations/_tests/pillar/core/test_users.py", line 36, in test_users_properties
    self.assertTrue(is_valid, "\n" + "\n".join(errors))
AssertionError: False is not true :
  Missing properties for alinap: {'ssh_keys'}
  Invalid properties for alinap: {'ssh-keys'}

----------------------------------------------------------------------
Ran 1 test in 0.277s

FAILED (failures=1)

$ python -m unittest discover pillar/core
.
----------------------------------------------------------------------
Ran 1 test in 0.275s
This revision is now accepted and ready to land.Dec 16 2019, 22:47
This revision was landed with ongoing or failed builds.Dec 16 2019, 22:49
This revision was automatically updated to reflect the committed changes.