Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F49452023
test_nextcloud_schema.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
test_nextcloud_schema.py
View Options
#!/usr/bin/env python3
# -------------------------------------------------------------
# Tests :: pillar :: saas :: NextCloud against JSON schema
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Description: Checks for NextCloud pillar coherence
# License: BSD-2-Clause
# -------------------------------------------------------------
import
unittest
from
unittest_data_provider
import
data_provider
from
pillar.schema_helpers
import
PILLAR_ROOT
,
assert_matches_schema
,
find_sls_files
PILLAR_PATH
=
PILLAR_ROOT
/
"saas"
/
"nextcloud"
SCHEMA
=
"nextcloud.schema.json"
class
Testinstance
(
unittest
.
TestCase
):
@staticmethod
def
provide_pillar_files
():
for
pillar_file_path
in
find_sls_files
(
PILLAR_PATH
):
yield
(
pillar_file_path
,)
@data_provider
(
provide_pillar_files
)
def
test_pillar_matches_schema
(
self
,
pillar_file_path
):
assert_matches_schema
(
self
,
pillar_file_path
,
SCHEMA
)
if
__name__
==
"__main__"
:
unittest
.
main
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Mon, Sep 14, 08:57 (14 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4066612
Default Alt Text
test_nextcloud_schema.py (1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment