From 9a2ee3ab0554949d7483cfb61709414c88a782c9 Mon Sep 17 00:00:00 2001 From: Maciej Lenartowicz Date: Tue, 28 Jan 2020 17:38:26 +0100 Subject: [PATCH 1/2] Added "rollback" snapshot type to schema. --- foris_controller_modules/schnapps/schema/schnapps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foris_controller_modules/schnapps/schema/schnapps.json b/foris_controller_modules/schnapps/schema/schnapps.json index 202e074..eccdcc3 100644 --- a/foris_controller_modules/schnapps/schema/schnapps.json +++ b/foris_controller_modules/schnapps/schema/schnapps.json @@ -1,7 +1,7 @@ { "definitions": { "number": {"type": "integer", "minimum": 1}, - "type": {"enum": ["pre", "post", "type", "single"]}, + "type": {"enum": ["pre", "post", "type", "single", "rollback"]}, "snapshot": { "type": "object", "properties": { -- GitLab From 6b2fd7d6c61e70514caf965d63b446337a4a7bd7 Mon Sep 17 00:00:00 2001 From: Maciej Lenartowicz Date: Thu, 30 Jan 2020 11:13:57 +0100 Subject: [PATCH 2/2] Fixed 'time' snapshot type. Added snapshot types to test. --- .../schnapps/schema/schnapps.json | 2 +- tests/test_schnapps.py | 33 +++++++++++++++---- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/foris_controller_modules/schnapps/schema/schnapps.json b/foris_controller_modules/schnapps/schema/schnapps.json index eccdcc3..77eeaf4 100644 --- a/foris_controller_modules/schnapps/schema/schnapps.json +++ b/foris_controller_modules/schnapps/schema/schnapps.json @@ -1,7 +1,7 @@ { "definitions": { "number": {"type": "integer", "minimum": 1}, - "type": {"enum": ["pre", "post", "type", "single", "rollback"]}, + "type": {"enum": ["pre", "post", "time", "single", "rollback"]}, "snapshot": { "type": "object", "properties": { diff --git a/tests/test_schnapps.py b/tests/test_schnapps.py index f155c36..703bd2f 100644 --- a/tests/test_schnapps.py +++ b/tests/test_schnapps.py @@ -84,18 +84,39 @@ def init_snapshots(): "snapshots": [ { "number": 1, - "created": "2019-11-27 14:15:27 +0000", - "type": "single", - "size": "74.16MiB", + "created": "2019-11-21 14:15:27 +0000", + "type": "pre", + "size": "61.16MiB", "description": "ARGGGHHH", }, { "number": 2, - "created": "2019-11-29 17:18:34 +0000", - "type": "single", - "size": "63.28MiB", + "created": "2019-11-22 17:18:34 +0000", + "type": "post", + "size": "62.28MiB", "description": "ARRGGHH 2", }, + { + "number": 3, + "created": "2019-11-23 17:18:34 +0000", + "type": "time", + "size": "63.12MiB", + "description": "ARRGGHH 3", + }, + { + "number": 4, + "created": "2019-11-24 17:18:34 +0000", + "type": "single", + "size": "64.12MiB", + "description": "ARRGGHH 4", + }, + { + "number": 5, + "created": "2019-11-25 17:18:34 +0000", + "type": "rollback", + "size": "65.12MiB", + "description": "ARRGGHH 5", + }, ] }, f, -- GitLab