From bdfe3a4fa9bd487ec5f40e829742e127476d2c8a Mon Sep 17 00:00:00 2001 From: Ɓukasz 'sil2100' Zemczak Date: Mon, 5 Feb 2018 17:25:14 +0100 Subject: Import patches-unapplied version 2.2.21-0ubuntu1 to ubuntu/bionic-proposed Imported using git-ubuntu import. Changelog parent: 6aaeb3237653102b5a376986f0ea73327a7a4379 New changelog entries: * New upstream release (LP: #1746628). * debian/patches/disable_import_test.patch: refreshed patch. --- tests/data/ext/sample_ext-1.2.0.zip | Bin 878 -> 0 bytes .../data/ext/sample_ext-1.2.0/HandlerManifest.json | 14 -------- tests/data/ext/sample_ext-1.2.0/sample.py | 37 --------------------- tests/data/ext/sample_ext-1.3.0.zip | Bin 0 -> 878 bytes .../data/ext/sample_ext-1.3.0/HandlerManifest.json | 14 ++++++++ tests/data/ext/sample_ext-1.3.0/sample.py | 37 +++++++++++++++++++++ 6 files changed, 51 insertions(+), 51 deletions(-) delete mode 100644 tests/data/ext/sample_ext-1.2.0.zip delete mode 100644 tests/data/ext/sample_ext-1.2.0/HandlerManifest.json delete mode 100755 tests/data/ext/sample_ext-1.2.0/sample.py create mode 100644 tests/data/ext/sample_ext-1.3.0.zip create mode 100644 tests/data/ext/sample_ext-1.3.0/HandlerManifest.json create mode 100755 tests/data/ext/sample_ext-1.3.0/sample.py (limited to 'tests/data/ext') diff --git a/tests/data/ext/sample_ext-1.2.0.zip b/tests/data/ext/sample_ext-1.2.0.zip deleted file mode 100644 index 08cfaf7..0000000 Binary files a/tests/data/ext/sample_ext-1.2.0.zip and /dev/null differ diff --git a/tests/data/ext/sample_ext-1.2.0/HandlerManifest.json b/tests/data/ext/sample_ext-1.2.0/HandlerManifest.json deleted file mode 100644 index 9890d0c..0000000 --- a/tests/data/ext/sample_ext-1.2.0/HandlerManifest.json +++ /dev/null @@ -1,14 +0,0 @@ -[{ - "name": "ExampleHandlerLinux", - "version": 1.0, - "handlerManifest": { - "installCommand": "sample.py -install", - "uninstallCommand": "sample.py -uninstall", - "updateCommand": "sample.py -update", - "enableCommand": "sample.py -enable", - "disableCommand": "sample.py -disable", - "rebootAfterInstall": false, - "reportHeartbeat": false - } -}] - diff --git a/tests/data/ext/sample_ext-1.2.0/sample.py b/tests/data/ext/sample_ext-1.2.0/sample.py deleted file mode 100755 index 74bd839..0000000 --- a/tests/data/ext/sample_ext-1.2.0/sample.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python - -import os - - -def get_seq(): - latest_seq = -1 - config_dir = os.path.join(os.getcwd(), "config") - if os.path.isdir(config_dir): - for item in os.listdir(config_dir): - item_path = os.path.join(config_dir, item) - if os.path.isfile(item_path): - separator = item.rfind(".") - if separator > 0 and item[separator + 1:] == "settings": - sequence = int(item[0: separator]) - if sequence > latest_seq: - latest_seq = sequence - return latest_seq - - -succeed_status = """ -[{ - "status": { - "status": "success" - } -}] -""" - -if __name__ == "__main__": - seq = get_seq() - if seq >= 0: - status_path = os.path.join(os.getcwd(), "status") - if not os.path.exists(status_path): - os.makedirs(status_path) - status_file = os.path.join(status_path, "{0}.status".format(seq)) - with open(status_file, "w+") as status: - status.write(succeed_status) diff --git a/tests/data/ext/sample_ext-1.3.0.zip b/tests/data/ext/sample_ext-1.3.0.zip new file mode 100644 index 0000000..08cfaf7 Binary files /dev/null and b/tests/data/ext/sample_ext-1.3.0.zip differ diff --git a/tests/data/ext/sample_ext-1.3.0/HandlerManifest.json b/tests/data/ext/sample_ext-1.3.0/HandlerManifest.json new file mode 100644 index 0000000..9890d0c --- /dev/null +++ b/tests/data/ext/sample_ext-1.3.0/HandlerManifest.json @@ -0,0 +1,14 @@ +[{ + "name": "ExampleHandlerLinux", + "version": 1.0, + "handlerManifest": { + "installCommand": "sample.py -install", + "uninstallCommand": "sample.py -uninstall", + "updateCommand": "sample.py -update", + "enableCommand": "sample.py -enable", + "disableCommand": "sample.py -disable", + "rebootAfterInstall": false, + "reportHeartbeat": false + } +}] + diff --git a/tests/data/ext/sample_ext-1.3.0/sample.py b/tests/data/ext/sample_ext-1.3.0/sample.py new file mode 100755 index 0000000..74bd839 --- /dev/null +++ b/tests/data/ext/sample_ext-1.3.0/sample.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python + +import os + + +def get_seq(): + latest_seq = -1 + config_dir = os.path.join(os.getcwd(), "config") + if os.path.isdir(config_dir): + for item in os.listdir(config_dir): + item_path = os.path.join(config_dir, item) + if os.path.isfile(item_path): + separator = item.rfind(".") + if separator > 0 and item[separator + 1:] == "settings": + sequence = int(item[0: separator]) + if sequence > latest_seq: + latest_seq = sequence + return latest_seq + + +succeed_status = """ +[{ + "status": { + "status": "success" + } +}] +""" + +if __name__ == "__main__": + seq = get_seq() + if seq >= 0: + status_path = os.path.join(os.getcwd(), "status") + if not os.path.exists(status_path): + os.makedirs(status_path) + status_file = os.path.join(status_path, "{0}.status".format(seq)) + with open(status_file, "w+") as status: + status.write(succeed_status) -- cgit v1.2.3