From 4755175ad26eaff1765407bb01f8820f394f847b Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 24 Oct 2019 02:20:33 -0500 Subject: hscript: Fully implement Timezone, add tests --- tests/fixtures/0131-timezone-basic.installfile | 6 ++++++ tests/fixtures/0132-timezone-invalid.installfile | 7 +++++++ tests/fixtures/0133-timezone-malicious.installfile | 7 +++++++ tests/fixtures/0134-timezone-subtz.installfile | 6 ++++++ 4 files changed, 26 insertions(+) create mode 100644 tests/fixtures/0131-timezone-basic.installfile create mode 100644 tests/fixtures/0132-timezone-invalid.installfile create mode 100644 tests/fixtures/0133-timezone-malicious.installfile create mode 100644 tests/fixtures/0134-timezone-subtz.installfile (limited to 'tests/fixtures') diff --git a/tests/fixtures/0131-timezone-basic.installfile b/tests/fixtures/0131-timezone-basic.installfile new file mode 100644 index 0000000..ca8306a --- /dev/null +++ b/tests/fixtures/0131-timezone-basic.installfile @@ -0,0 +1,6 @@ +network false +hostname test.machine +pkginstall adelie-base +rootpw $6$gumtLGmHwOVIRpQR$2M9PUO24hy5mofzWWf9a.YLbzOgOlUby1g0hDj.wG67E2wrrvys59fq02PPdxBdbgkLZFtjfEx6MHZwMBamwu/ +mount /dev/sda1 / +timezone UTC diff --git a/tests/fixtures/0132-timezone-invalid.installfile b/tests/fixtures/0132-timezone-invalid.installfile new file mode 100644 index 0000000..53e8446 --- /dev/null +++ b/tests/fixtures/0132-timezone-invalid.installfile @@ -0,0 +1,7 @@ +network false +hostname test.machine +pkginstall adelie-base +rootpw $6$gumtLGmHwOVIRpQR$2M9PUO24hy5mofzWWf9a.YLbzOgOlUby1g0hDj.wG67E2wrrvys59fq02PPdxBdbgkLZFtjfEx6MHZwMBamwu/ +mount /dev/sda1 / +# This is in Africa, not America. +timezone America/Nairobi diff --git a/tests/fixtures/0133-timezone-malicious.installfile b/tests/fixtures/0133-timezone-malicious.installfile new file mode 100644 index 0000000..519d3ec --- /dev/null +++ b/tests/fixtures/0133-timezone-malicious.installfile @@ -0,0 +1,7 @@ +network false +hostname test.machine +pkginstall adelie-base +rootpw $6$gumtLGmHwOVIRpQR$2M9PUO24hy5mofzWWf9a.YLbzOgOlUby1g0hDj.wG67E2wrrvys59fq02PPdxBdbgkLZFtjfEx6MHZwMBamwu/ +mount /dev/sda1 / +# Try to get the Runner to copy /etc/passwd to /target/etc/localtime +timezone ../../../etc/passwd diff --git a/tests/fixtures/0134-timezone-subtz.installfile b/tests/fixtures/0134-timezone-subtz.installfile new file mode 100644 index 0000000..72af414 --- /dev/null +++ b/tests/fixtures/0134-timezone-subtz.installfile @@ -0,0 +1,6 @@ +network false +hostname test.machine +pkginstall adelie-base +rootpw $6$gumtLGmHwOVIRpQR$2M9PUO24hy5mofzWWf9a.YLbzOgOlUby1g0hDj.wG67E2wrrvys59fq02PPdxBdbgkLZFtjfEx6MHZwMBamwu/ +mount /dev/sda1 / +timezone Pacific/Galapagos -- cgit v1.2.3-70-g09d2