feat(scheduled-jobs): the install command, time zone, owners and platform sources are the driver's
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 1m7s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / test (3.12) (pull_request) Successful in 1m12s
driver / lowest (pull_request) Successful in 39s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m6s
CI / driver (pull_request) Successful in 2m48s
driver / publish (pull_request) Skipped
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 1m7s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / test (3.12) (pull_request) Successful in 1m12s
driver / lowest (pull_request) Successful in 39s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m6s
CI / driver (pull_request) Successful in 2m48s
driver / publish (pull_request) Skipped
A BSD install takes -D as a destdir, OpenWrt keeps its time zone in uci and its package database in opkg, and a platform's generated files are its own; each is a class attribute a driver sets. Refs #86
This commit is contained in:
1 parent
834cb2e0ea
commit
df476a12f2
3 files changed
+47
-5
No files matched your search
@@ -280,6 +280,22 @@ class TestReading:
|
||||
host.get_scheduled_jobs()
|
||||
|
||||
|
||||
class TestDriverSettings:
|
||||
def test_what_the_platform_generates(self, root: Path):
|
||||
host = Host(root)
|
||||
host.PLATFORM_SOURCES = ("*/cron.d/cert*",) # type: ignore[misc]
|
||||
certbot = next(j for j in _jobs(host).values() if j["source"].endswith("certbot"))
|
||||
assert certbot["managed_by"] == "platform"
|
||||
|
||||
def test_the_time_zone_and_owners_commands_are_the_drivers(self, root: Path):
|
||||
host = Host(root)
|
||||
host.TIME_ZONE_SH = "echo America/New_York" # type: ignore[misc]
|
||||
host.OWNERS_SH = "cat >/dev/null" # type: ignore[misc]
|
||||
reading = host.get_scheduled_jobs()
|
||||
assert reading["time_zone"] == "America/New_York"
|
||||
assert {j["managed_by"] for j in reading["jobs"] if j["kind"] == "cron"} == {"admin"}
|
||||
|
||||
|
||||
class TestParseReading:
|
||||
def test_the_time_zone_from_either_file(self):
|
||||
out = "SJ_BEGIN\n[tz]\n/usr/share/zoneinfo/Europe/Berlin\nSJ_END\n"
|
||||
|
||||
Reference in new issue
Block a user