gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: add test resources


From: gnunet
Subject: [taler-anastasis] branch master updated: add test resources
Date: Mon, 28 Dec 2020 12:26:43 +0100

This is an automated email from the git hooks/post-receive script.

dennis-neufeld pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 492ff74  add test resources
492ff74 is described below

commit 492ff745e8e310dc4c7c08d2f8626f375954f735
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Mon Dec 28 12:26:38 2020 +0100

    add test resources
---
 contrib/test_resources/test_reducer_stateAESTATE   | 123 ++++++++
 .../test_resources/test_reducer_stateAESTATE_FINAL | 146 ++++++++++
 contrib/test_resources/test_reducer_stateBFSTATE   | 311 +++++++++++++++++++++
 contrib/test_resources/test_reducer_statePPSTATE   | 311 +++++++++++++++++++++
 contrib/test_resources/test_reducer_statePRSTATE   | 187 +++++++++++++
 contrib/test_resources/test_reducer_stateSESTATE   | 241 ++++++++++++++++
 contrib/test_resources/test_reducer_stateUACSTATE  | 116 ++++++++
 7 files changed, 1435 insertions(+)

diff --git a/contrib/test_resources/test_reducer_stateAESTATE 
b/contrib/test_resources/test_reducer_stateAESTATE
new file mode 100644
index 0000000..1109feb
--- /dev/null
+++ b/contrib/test_resources/test_reducer_stateAESTATE
@@ -0,0 +1,123 @@
+{
+  "backup_state": "AUTHENTICATIONS_EDITING",
+  "continents": [
+    "Europe",
+    "North_America"
+  ],
+  "selected_continent": "Europe",
+  "countries": [
+    {
+      "code": "ch",
+      "name": "Switzerland",
+      "continent": "Europe",
+      "name_i18n": {
+        "de_DE": "Schweiz",
+        "de_CH": "Schwiiz",
+        "fr": "Suisse",
+        "en": "Swiss"
+      },
+      "currency": "TESTKUDOS"
+    },
+    {
+      "code": "de",
+      "name": "Germany",
+      "continent": "Europe",
+      "continent_i18n": {
+        "de": "Europa"
+      },
+      "name_i18n": {
+        "de_DE": "Deutschland",
+        "de_CH": "Deutschland",
+        "fr": "Allemagne",
+        "en": "Germany"
+      },
+      "currency": "TESTKUDOS"
+    }
+  ],
+  "selected_country": "ch",
+  "currency": "TESTKUDOS",
+  "required_attributes": [
+    {
+      "type": "string",
+      "name": "full_name",
+      "label": "Full name",
+      "label_i18n": {
+        "de_DE": "Vollstaendiger Name",
+        "de_CH": "Vollstaendiger Name"
+      },
+      "widget": "anastasis_gtk_ia_full_name"
+    },
+    {
+      "type": "date",
+      "name": "birthdate",
+      "label": "Birthdate",
+      "label_i18n": {
+        "de_CH": "Geburtsdatum"
+      },
+      "widget": "anastasis_gtk_ia_birthdate"
+    },
+    {
+      "type": "string",
+      "name": "ahv_number",
+      "label": "AHV number",
+      "label_i18n": {
+        "de_DE": "AHV-Nummer",
+        "de_CH": "AHV-Nummer"
+      },
+      "widget": "anastasis_gtk_ia_ahv",
+      "validation-regex": "^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
+      "validation-logic": "CH_AVH_check"
+    }
+  ],
+  "authentication_providers": {
+    "question": [
+      {
+        "anastasis_04": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:0",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8089/",
+          "provider_name": "Anastasis 4",
+          "provider_salt": "8HAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_03": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8088/",
+          "provider_name": "Anastasis 3",
+          "provider_salt": "8DAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_02": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:1.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8087/",
+          "provider_name": "Anastasis 2",
+          "provider_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_01": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8086/",
+          "provider_name": "Anastasis 1",
+          "provider_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+        }
+      }
+    ]
+  },
+  "identity_attributes": {
+    "full_name": "Max Musterman",
+    "ahv_number": "756.9217.0769.85",
+    "birth_year": 2000,
+    "birth_month": 1,
+    "birth_day": 1
+  }
+}
\ No newline at end of file
diff --git a/contrib/test_resources/test_reducer_stateAESTATE_FINAL 
b/contrib/test_resources/test_reducer_stateAESTATE_FINAL
new file mode 100644
index 0000000..f47d617
--- /dev/null
+++ b/contrib/test_resources/test_reducer_stateAESTATE_FINAL
@@ -0,0 +1,146 @@
+{
+  "backup_state": "AUTHENTICATIONS_EDITING",
+  "continents": [
+    "Europe",
+    "North_America"
+  ],
+  "selected_continent": "Europe",
+  "countries": [
+    {
+      "code": "ch",
+      "name": "Switzerland",
+      "continent": "Europe",
+      "name_i18n": {
+        "de_DE": "Schweiz",
+        "de_CH": "Schwiiz",
+        "fr": "Suisse",
+        "en": "Swiss"
+      },
+      "currency": "TESTKUDOS"
+    },
+    {
+      "code": "de",
+      "name": "Germany",
+      "continent": "Europe",
+      "continent_i18n": {
+        "de": "Europa"
+      },
+      "name_i18n": {
+        "de_DE": "Deutschland",
+        "de_CH": "Deutschland",
+        "fr": "Allemagne",
+        "en": "Germany"
+      },
+      "currency": "TESTKUDOS"
+    }
+  ],
+  "selected_country": "ch",
+  "currency": "TESTKUDOS",
+  "required_attributes": [
+    {
+      "type": "string",
+      "name": "full_name",
+      "label": "Full name",
+      "label_i18n": {
+        "de_DE": "Vollstaendiger Name",
+        "de_CH": "Vollstaendiger Name"
+      },
+      "widget": "anastasis_gtk_ia_full_name"
+    },
+    {
+      "type": "date",
+      "name": "birthdate",
+      "label": "Birthdate",
+      "label_i18n": {
+        "de_CH": "Geburtsdatum"
+      },
+      "widget": "anastasis_gtk_ia_birthdate"
+    },
+    {
+      "type": "string",
+      "name": "ahv_number",
+      "label": "AHV number",
+      "label_i18n": {
+        "de_DE": "AHV-Nummer",
+        "de_CH": "AHV-Nummer"
+      },
+      "widget": "anastasis_gtk_ia_ahv",
+      "validation-regex": "^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
+      "validation-logic": "CH_AVH_check"
+    }
+  ],
+  "authentication_providers": {
+    "question": [
+      {
+        "anastasis_04": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:0",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8089/",
+          "provider_name": "Anastasis 4",
+          "provider_salt": "8HAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_03": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8088/",
+          "provider_name": "Anastasis 3",
+          "provider_salt": "8DAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_02": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:1.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8087/",
+          "provider_name": "Anastasis 2",
+          "provider_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_01": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8086/",
+          "provider_name": "Anastasis 1",
+          "provider_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+        }
+      }
+    ]
+  },
+  "identity_attributes": {
+    "full_name": "Max Musterman",
+    "ahv_number": "756.9217.0769.85",
+    "birth_year": 2000,
+    "birth_month": 1,
+    "birth_day": 1
+  },
+  "authentication_methods": [
+    {
+      "method": "question",
+      "data": {
+        "question": "Whats your name?",
+        "answer": "Hans"
+      }
+    },
+    {
+      "method": "question",
+      "data": {
+        "question": "How old are you?",
+        "answer": "123"
+      }
+    },
+    {
+      "method": "question",
+      "data": {
+        "question": "Where do you live?",
+        "answer": "Mars"
+      }
+    }
+  ]
+}
\ No newline at end of file
diff --git a/contrib/test_resources/test_reducer_stateBFSTATE 
b/contrib/test_resources/test_reducer_stateBFSTATE
new file mode 100644
index 0000000..501b921
--- /dev/null
+++ b/contrib/test_resources/test_reducer_stateBFSTATE
@@ -0,0 +1,311 @@
+{
+  "backup_state": "BACKUP_FINISHED",
+  "continents": [
+    "Europe",
+    "North_America"
+  ],
+  "selected_continent": "Europe",
+  "countries": [
+    {
+      "code": "ch",
+      "name": "Switzerland",
+      "continent": "Europe",
+      "name_i18n": {
+        "de_DE": "Schweiz",
+        "de_CH": "Schwiiz",
+        "fr": "Suisse",
+        "en": "Swiss"
+      },
+      "currency": "TESTKUDOS"
+    },
+    {
+      "code": "de",
+      "name": "Germany",
+      "continent": "Europe",
+      "continent_i18n": {
+        "de": "Europa"
+      },
+      "name_i18n": {
+        "de_DE": "Deutschland",
+        "de_CH": "Deutschland",
+        "fr": "Allemagne",
+        "en": "Germany"
+      },
+      "currency": "TESTKUDOS"
+    }
+  ],
+  "selected_country": "ch",
+  "currency": "TESTKUDOS",
+  "required_attributes": [
+    {
+      "type": "string",
+      "name": "full_name",
+      "label": "Full name",
+      "label_i18n": {
+        "de_DE": "Vollstaendiger Name",
+        "de_CH": "Vollstaendiger Name"
+      },
+      "widget": "anastasis_gtk_ia_full_name"
+    },
+    {
+      "type": "date",
+      "name": "birthdate",
+      "label": "Birthdate",
+      "label_i18n": {
+        "de_CH": "Geburtsdatum"
+      },
+      "widget": "anastasis_gtk_ia_birthdate"
+    },
+    {
+      "type": "string",
+      "name": "ahv_number",
+      "label": "AHV number",
+      "label_i18n": {
+        "de_DE": "AHV-Nummer",
+        "de_CH": "AHV-Nummer"
+      },
+      "widget": "anastasis_gtk_ia_ahv",
+      "validation-regex": "^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
+      "validation-logic": "CH_AVH_check"
+    }
+  ],
+  "authentication_providers": {
+    "question": [
+      {
+        "anastasis_04": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:0",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8089/",
+          "provider_name": "Anastasis 4",
+          "provider_salt": "8HAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_03": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8088/",
+          "provider_name": "Anastasis 3",
+          "provider_salt": "8DAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_02": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:1.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8087/",
+          "provider_name": "Anastasis 2",
+          "provider_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_01": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8086/",
+          "provider_name": "Anastasis 1",
+          "provider_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+        }
+      }
+    ]
+  },
+  "identity_attributes": {
+    "full_name": "Max Musterman",
+    "ahv_number": "756.9217.0769.85",
+    "birth_year": 2000,
+    "birth_month": 1,
+    "birth_day": 1
+  },
+  "authentication_methods": [
+    {
+      "method": "question",
+      "data": {
+        "question": "Whats your name?",
+        "answer": "Hans"
+      }
+    },
+    {
+      "method": "question",
+      "data": {
+        "question": "How old are you?",
+        "answer": "123"
+      }
+    },
+    {
+      "method": "question",
+      "data": {
+        "question": "Where do you live?",
+        "answer": "Mars"
+      }
+    }
+  ],
+  "policies": [
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 0,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 1,
+          "provider": "anastasis_01"
+        }
+      ]
+    },
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 0,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 2,
+          "provider": "anastasis_01"
+        }
+      ]
+    },
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 1,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 2,
+          "provider": "anastasis_01"
+        }
+      ]
+    }
+  ],
+  "truths": [
+    {
+      "auth_method_index": 0,
+      "backend_url": "localhost:8087/",
+      "backend_id": "anastasis_02",
+      "method": "question",
+      "truth_data": {
+        "question": "Whats your name?",
+        "answer": "Hans"
+      },
+      "instructions": "Whats your name?",
+      "mime_type": "text",
+      "backend_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+    },
+    {
+      "auth_method_index": 1,
+      "backend_url": "localhost:8086/",
+      "backend_id": "anastasis_01",
+      "method": "question",
+      "truth_data": {
+        "question": "How old are you?",
+        "answer": "123"
+      },
+      "instructions": "How old are you?",
+      "mime_type": "text",
+      "backend_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+    },
+    {
+      "auth_method_index": 2,
+      "backend_url": "localhost:8086/",
+      "backend_id": "anastasis_01",
+      "method": "question",
+      "truth_data": {
+        "question": "Where do you live?",
+        "answer": "Mars"
+      },
+      "instructions": "Where do you live?",
+      "mime_type": "text",
+      "backend_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+    },
+    {
+      "auth_method_index": 1,
+      "backend_url": "localhost:8087/",
+      "backend_id": "anastasis_02",
+      "method": "question",
+      "truth_data": {
+        "question": "How old are you?",
+        "answer": "123"
+      },
+      "instructions": "How old are you?",
+      "mime_type": "text",
+      "backend_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+    }
+  ],
+  "core_secret": {
+    "secret": "veryhardtoguesssecret",
+    "type": "password"
+  },
+  "truth_uploads": {
+    "0": {
+      "status": 204,
+      "truth": {
+        "url": "localhost:8087/",
+        "nonce": "C97GR4C0DJHD13SJJ2MC8JVTAVYNBT5K99HES7J0ZVK8JBBWQAM0",
+        "method": "question",
+        "instructions": "Whats your name?",
+        "mime-type": "text",
+        "key-share": "BXSEGJZ08ZWTJP81MQYB50X8TTA03RNE5X1K24DCB6FXKBNT35J0",
+        "truth-key": 
"RBYC5WS9K9Y5V9YZ79NNMV5T3AQYFV2ZYR78RXC70ZZR1YB2JKVAJRXE677H7M4RZC1QRD83X13CC13GZE5A4M9DYYCWNKEC5WF12K8",
+        "salt": "89APCKSH9D3MYJTS9536RHJHCW"
+      }
+    },
+    "1": {
+      "status": 204,
+      "truth": {
+        "url": "localhost:8086/",
+        "nonce": "WNVBTZ17QBSHAY7NJ4DF13FT24RVHXBASAQFT3Q0X2W6W4BV2BV0",
+        "method": "question",
+        "instructions": "How old are you?",
+        "mime-type": "text",
+        "key-share": "Z37MEXQBPBG0EXCJBAD733E5VFECY499B7T8JKQW5Z1FHW10KHA0",
+        "truth-key": 
"0SP0RH47HJ6K2CKHZAYJE4W425XR6SPKQ3S4N6SSFT1JXY29QY8SASMW7G4CB99DMTA502634HTTQFN4651RRH2A7PBAEWDEX07NV90",
+        "salt": "85APCKSH9D3MYJTS9536RHJHCW"
+      }
+    },
+    "2": {
+      "status": 204,
+      "truth": {
+        "url": "localhost:8086/",
+        "nonce": "05P5S1MV8B71E0PSMSHGW8EZ2QRHFFTG92EY8W7P8CVHA8Y3FDRG",
+        "method": "question",
+        "instructions": "Where do you live?",
+        "mime-type": "text",
+        "key-share": "CW8ZWVE6WQ07FP32W2H3DP0YKRGCTH8Y9506FJJPKFR9HJ08344G",
+        "truth-key": 
"XRY6E04NDWMR0NWQ6WRV3RXPF25MS2VJ65R95V0QA3XPDMQHP79MZP2GHNH8SJJM1QTNWHZPHB1WFBAVPYD0PSWFVWDZDCDEG3AACR8",
+        "salt": "85APCKSH9D3MYJTS9536RHJHCW"
+      }
+    },
+    "3": {
+      "status": 204,
+      "truth": {
+        "url": "localhost:8087/",
+        "nonce": "AH9JXTRB236FXW03VFKX3QH2AVN58YWV5A0ZSCT5S038R5M7WQ70",
+        "method": "question",
+        "instructions": "How old are you?",
+        "mime-type": "text",
+        "key-share": "PMJJD6QV4AJ7K1V4K0QQXR71VTZ9A7VFWY9DRGDJ5SJ31HEVKWC0",
+        "truth-key": 
"H1T3PW35QY4B5W30PXCH94V8RHBNAWV3SMV1B37GQVA8M5KS57XKD029F0JE9MSC2DKNQ1KZ6FEZVDK985G7W21V65DZ8D4CMXMNJ90",
+        "salt": "89APCKSH9D3MYJTS9536RHJHCW"
+      }
+    }
+  },
+  "recovery_document_uploads": {
+    "anastasis_02": {
+      "status": 204,
+      "provider_url": "localhost:8087/",
+      "pay_url": 
"taler+http://pay/localhost:9966/Z1X5861TCBGA63FGA1WGBWJ9409EPCFZNJ29FD916XX3BTY94VWG/";
+    },
+    "anastasis_01": {
+      "status": 204,
+      "provider_url": "localhost:8086/",
+      "pay_url": 
"taler+http://pay/localhost:9966/7RQASYVWMD1YNPCWX5YAWV39M8TAYJHDMKSXTP9TN25FCX3X2NE0/";
+    }
+  }
+}
\ No newline at end of file
diff --git a/contrib/test_resources/test_reducer_statePPSTATE 
b/contrib/test_resources/test_reducer_statePPSTATE
new file mode 100644
index 0000000..8ca1846
--- /dev/null
+++ b/contrib/test_resources/test_reducer_statePPSTATE
@@ -0,0 +1,311 @@
+{
+  "backup_state": "POLICIES_PAYING",
+  "continents": [
+    "Europe",
+    "North_America"
+  ],
+  "selected_continent": "Europe",
+  "countries": [
+    {
+      "code": "ch",
+      "name": "Switzerland",
+      "continent": "Europe",
+      "name_i18n": {
+        "de_DE": "Schweiz",
+        "de_CH": "Schwiiz",
+        "fr": "Suisse",
+        "en": "Swiss"
+      },
+      "currency": "TESTKUDOS"
+    },
+    {
+      "code": "de",
+      "name": "Germany",
+      "continent": "Europe",
+      "continent_i18n": {
+        "de": "Europa"
+      },
+      "name_i18n": {
+        "de_DE": "Deutschland",
+        "de_CH": "Deutschland",
+        "fr": "Allemagne",
+        "en": "Germany"
+      },
+      "currency": "TESTKUDOS"
+    }
+  ],
+  "selected_country": "ch",
+  "currency": "TESTKUDOS",
+  "required_attributes": [
+    {
+      "type": "string",
+      "name": "full_name",
+      "label": "Full name",
+      "label_i18n": {
+        "de_DE": "Vollstaendiger Name",
+        "de_CH": "Vollstaendiger Name"
+      },
+      "widget": "anastasis_gtk_ia_full_name"
+    },
+    {
+      "type": "date",
+      "name": "birthdate",
+      "label": "Birthdate",
+      "label_i18n": {
+        "de_CH": "Geburtsdatum"
+      },
+      "widget": "anastasis_gtk_ia_birthdate"
+    },
+    {
+      "type": "string",
+      "name": "ahv_number",
+      "label": "AHV number",
+      "label_i18n": {
+        "de_DE": "AHV-Nummer",
+        "de_CH": "AHV-Nummer"
+      },
+      "widget": "anastasis_gtk_ia_ahv",
+      "validation-regex": "^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
+      "validation-logic": "CH_AVH_check"
+    }
+  ],
+  "authentication_providers": {
+    "question": [
+      {
+        "anastasis_04": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:0",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8089/",
+          "provider_name": "Anastasis 4",
+          "provider_salt": "8HAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_03": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8088/",
+          "provider_name": "Anastasis 3",
+          "provider_salt": "8DAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_02": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:1.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8087/",
+          "provider_name": "Anastasis 2",
+          "provider_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_01": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8086/",
+          "provider_name": "Anastasis 1",
+          "provider_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+        }
+      }
+    ]
+  },
+  "identity_attributes": {
+    "full_name": "Max Musterman",
+    "ahv_number": "756.9217.0769.85",
+    "birth_year": 2000,
+    "birth_month": 1,
+    "birth_day": 1
+  },
+  "authentication_methods": [
+    {
+      "method": "question",
+      "data": {
+        "question": "Whats your name?",
+        "answer": "Hans"
+      }
+    },
+    {
+      "method": "question",
+      "data": {
+        "question": "How old are you?",
+        "answer": "123"
+      }
+    },
+    {
+      "method": "question",
+      "data": {
+        "question": "Where do you live?",
+        "answer": "Mars"
+      }
+    }
+  ],
+  "policies": [
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 0,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 1,
+          "provider": "anastasis_01"
+        }
+      ]
+    },
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 0,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 2,
+          "provider": "anastasis_01"
+        }
+      ]
+    },
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 1,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 2,
+          "provider": "anastasis_01"
+        }
+      ]
+    }
+  ],
+  "truths": [
+    {
+      "auth_method_index": 0,
+      "backend_url": "localhost:8087/",
+      "backend_id": "anastasis_02",
+      "method": "question",
+      "truth_data": {
+        "question": "Whats your name?",
+        "answer": "Hans"
+      },
+      "instructions": "Whats your name?",
+      "mime_type": "text",
+      "backend_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+    },
+    {
+      "auth_method_index": 1,
+      "backend_url": "localhost:8086/",
+      "backend_id": "anastasis_01",
+      "method": "question",
+      "truth_data": {
+        "question": "How old are you?",
+        "answer": "123"
+      },
+      "instructions": "How old are you?",
+      "mime_type": "text",
+      "backend_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+    },
+    {
+      "auth_method_index": 2,
+      "backend_url": "localhost:8086/",
+      "backend_id": "anastasis_01",
+      "method": "question",
+      "truth_data": {
+        "question": "Where do you live?",
+        "answer": "Mars"
+      },
+      "instructions": "Where do you live?",
+      "mime_type": "text",
+      "backend_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+    },
+    {
+      "auth_method_index": 1,
+      "backend_url": "localhost:8087/",
+      "backend_id": "anastasis_02",
+      "method": "question",
+      "truth_data": {
+        "question": "How old are you?",
+        "answer": "123"
+      },
+      "instructions": "How old are you?",
+      "mime_type": "text",
+      "backend_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+    }
+  ],
+  "core_secret": {
+    "secret": "veryhardtoguesssecret",
+    "type": "password"
+  },
+  "truth_uploads": {
+    "0": {
+      "status": 204,
+      "truth": {
+        "url": "localhost:8087/",
+        "nonce": "C97GR4C0DJHD13SJJ2MC8JVTAVYNBT5K99HES7J0ZVK8JBBWQAM0",
+        "method": "question",
+        "instructions": "Whats your name?",
+        "mime-type": "text",
+        "key-share": "BXSEGJZ08ZWTJP81MQYB50X8TTA03RNE5X1K24DCB6FXKBNT35J0",
+        "truth-key": 
"RBYC5WS9K9Y5V9YZ79NNMV5T3AQYFV2ZYR78RXC70ZZR1YB2JKVAJRXE677H7M4RZC1QRD83X13CC13GZE5A4M9DYYCWNKEC5WF12K8",
+        "salt": "89APCKSH9D3MYJTS9536RHJHCW"
+      }
+    },
+    "1": {
+      "status": 204,
+      "truth": {
+        "url": "localhost:8086/",
+        "nonce": "WNVBTZ17QBSHAY7NJ4DF13FT24RVHXBASAQFT3Q0X2W6W4BV2BV0",
+        "method": "question",
+        "instructions": "How old are you?",
+        "mime-type": "text",
+        "key-share": "Z37MEXQBPBG0EXCJBAD733E5VFECY499B7T8JKQW5Z1FHW10KHA0",
+        "truth-key": 
"0SP0RH47HJ6K2CKHZAYJE4W425XR6SPKQ3S4N6SSFT1JXY29QY8SASMW7G4CB99DMTA502634HTTQFN4651RRH2A7PBAEWDEX07NV90",
+        "salt": "85APCKSH9D3MYJTS9536RHJHCW"
+      }
+    },
+    "2": {
+      "status": 204,
+      "truth": {
+        "url": "localhost:8086/",
+        "nonce": "05P5S1MV8B71E0PSMSHGW8EZ2QRHFFTG92EY8W7P8CVHA8Y3FDRG",
+        "method": "question",
+        "instructions": "Where do you live?",
+        "mime-type": "text",
+        "key-share": "CW8ZWVE6WQ07FP32W2H3DP0YKRGCTH8Y9506FJJPKFR9HJ08344G",
+        "truth-key": 
"XRY6E04NDWMR0NWQ6WRV3RXPF25MS2VJ65R95V0QA3XPDMQHP79MZP2GHNH8SJJM1QTNWHZPHB1WFBAVPYD0PSWFVWDZDCDEG3AACR8",
+        "salt": "85APCKSH9D3MYJTS9536RHJHCW"
+      }
+    },
+    "3": {
+      "status": 204,
+      "truth": {
+        "url": "localhost:8087/",
+        "nonce": "AH9JXTRB236FXW03VFKX3QH2AVN58YWV5A0ZSCT5S038R5M7WQ70",
+        "method": "question",
+        "instructions": "How old are you?",
+        "mime-type": "text",
+        "key-share": "PMJJD6QV4AJ7K1V4K0QQXR71VTZ9A7VFWY9DRGDJ5SJ31HEVKWC0",
+        "truth-key": 
"H1T3PW35QY4B5W30PXCH94V8RHBNAWV3SMV1B37GQVA8M5KS57XKD029F0JE9MSC2DKNQ1KZ6FEZVDK985G7W21V65DZ8D4CMXMNJ90",
+        "salt": "89APCKSH9D3MYJTS9536RHJHCW"
+      }
+    }
+  },
+  "recovery_document_uploads": {
+    "anastasis_02": {
+      "status": 402,
+      "provider_url": "localhost:8087/",
+      "pay_url": 
"taler+http://pay/localhost:9966/Z1X5861TCBGA63FGA1WGBWJ9409EPCFZNJ29FD916XX3BTY94VWG/";
+    },
+    "anastasis_01": {
+      "status": 402,
+      "provider_url": "localhost:8086/",
+      "pay_url": 
"taler+http://pay/localhost:9966/7RQASYVWMD1YNPCWX5YAWV39M8TAYJHDMKSXTP9TN25FCX3X2NE0/";
+    }
+  }
+}
\ No newline at end of file
diff --git a/contrib/test_resources/test_reducer_statePRSTATE 
b/contrib/test_resources/test_reducer_statePRSTATE
new file mode 100644
index 0000000..648a4f7
--- /dev/null
+++ b/contrib/test_resources/test_reducer_statePRSTATE
@@ -0,0 +1,187 @@
+{
+  "backup_state": "POLICIES_REVIEWING",
+  "continents": [
+    "Europe",
+    "North_America"
+  ],
+  "selected_continent": "Europe",
+  "countries": [
+    {
+      "code": "ch",
+      "name": "Switzerland",
+      "continent": "Europe",
+      "name_i18n": {
+        "de_DE": "Schweiz",
+        "de_CH": "Schwiiz",
+        "fr": "Suisse",
+        "en": "Swiss"
+      },
+      "currency": "TESTKUDOS"
+    },
+    {
+      "code": "de",
+      "name": "Germany",
+      "continent": "Europe",
+      "continent_i18n": {
+        "de": "Europa"
+      },
+      "name_i18n": {
+        "de_DE": "Deutschland",
+        "de_CH": "Deutschland",
+        "fr": "Allemagne",
+        "en": "Germany"
+      },
+      "currency": "TESTKUDOS"
+    }
+  ],
+  "selected_country": "ch",
+  "currency": "TESTKUDOS",
+  "required_attributes": [
+    {
+      "type": "string",
+      "name": "full_name",
+      "label": "Full name",
+      "label_i18n": {
+        "de_DE": "Vollstaendiger Name",
+        "de_CH": "Vollstaendiger Name"
+      },
+      "widget": "anastasis_gtk_ia_full_name"
+    },
+    {
+      "type": "date",
+      "name": "birthdate",
+      "label": "Birthdate",
+      "label_i18n": {
+        "de_CH": "Geburtsdatum"
+      },
+      "widget": "anastasis_gtk_ia_birthdate"
+    },
+    {
+      "type": "string",
+      "name": "ahv_number",
+      "label": "AHV number",
+      "label_i18n": {
+        "de_DE": "AHV-Nummer",
+        "de_CH": "AHV-Nummer"
+      },
+      "widget": "anastasis_gtk_ia_ahv",
+      "validation-regex": "^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
+      "validation-logic": "CH_AVH_check"
+    }
+  ],
+  "authentication_providers": {
+    "question": [
+      {
+        "anastasis_04": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:0",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8089/",
+          "provider_name": "Anastasis 4",
+          "provider_salt": "8HAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_03": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8088/",
+          "provider_name": "Anastasis 3",
+          "provider_salt": "8DAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_02": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:1.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8087/",
+          "provider_name": "Anastasis 2",
+          "provider_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_01": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8086/",
+          "provider_name": "Anastasis 1",
+          "provider_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+        }
+      }
+    ]
+  },
+  "identity_attributes": {
+    "full_name": "Max Musterman",
+    "ahv_number": "756.9217.0769.85",
+    "birth_year": 2000,
+    "birth_month": 1,
+    "birth_day": 1
+  },
+  "authentication_methods": [
+    {
+      "method": "question",
+      "data": {
+        "question": "Whats your name?",
+        "answer": "Hans"
+      }
+    },
+    {
+      "method": "question",
+      "data": {
+        "question": "How old are you?",
+        "answer": "123"
+      }
+    },
+    {
+      "method": "question",
+      "data": {
+        "question": "Where do you live?",
+        "answer": "Mars"
+      }
+    }
+  ],
+  "policies": [
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 0,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 1,
+          "provider": "anastasis_01"
+        }
+      ]
+    },
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 0,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 2,
+          "provider": "anastasis_01"
+        }
+      ]
+    },
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 1,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 2,
+          "provider": "anastasis_01"
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/contrib/test_resources/test_reducer_stateSESTATE 
b/contrib/test_resources/test_reducer_stateSESTATE
new file mode 100644
index 0000000..f35c70d
--- /dev/null
+++ b/contrib/test_resources/test_reducer_stateSESTATE
@@ -0,0 +1,241 @@
+{
+  "backup_state": "SECRET_EDITING",
+  "continents": [
+    "Europe",
+    "North_America"
+  ],
+  "selected_continent": "Europe",
+  "countries": [
+    {
+      "code": "ch",
+      "name": "Switzerland",
+      "continent": "Europe",
+      "name_i18n": {
+        "de_DE": "Schweiz",
+        "de_CH": "Schwiiz",
+        "fr": "Suisse",
+        "en": "Swiss"
+      },
+      "currency": "TESTKUDOS"
+    },
+    {
+      "code": "de",
+      "name": "Germany",
+      "continent": "Europe",
+      "continent_i18n": {
+        "de": "Europa"
+      },
+      "name_i18n": {
+        "de_DE": "Deutschland",
+        "de_CH": "Deutschland",
+        "fr": "Allemagne",
+        "en": "Germany"
+      },
+      "currency": "TESTKUDOS"
+    }
+  ],
+  "selected_country": "ch",
+  "currency": "TESTKUDOS",
+  "required_attributes": [
+    {
+      "type": "string",
+      "name": "full_name",
+      "label": "Full name",
+      "label_i18n": {
+        "de_DE": "Vollstaendiger Name",
+        "de_CH": "Vollstaendiger Name"
+      },
+      "widget": "anastasis_gtk_ia_full_name"
+    },
+    {
+      "type": "date",
+      "name": "birthdate",
+      "label": "Birthdate",
+      "label_i18n": {
+        "de_CH": "Geburtsdatum"
+      },
+      "widget": "anastasis_gtk_ia_birthdate"
+    },
+    {
+      "type": "string",
+      "name": "ahv_number",
+      "label": "AHV number",
+      "label_i18n": {
+        "de_DE": "AHV-Nummer",
+        "de_CH": "AHV-Nummer"
+      },
+      "widget": "anastasis_gtk_ia_ahv",
+      "validation-regex": "^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
+      "validation-logic": "CH_AVH_check"
+    }
+  ],
+  "authentication_providers": {
+    "question": [
+      {
+        "anastasis_04": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:0",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8089/",
+          "provider_name": "Anastasis 4",
+          "provider_salt": "8HAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_03": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8088/",
+          "provider_name": "Anastasis 3",
+          "provider_salt": "8DAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_02": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:1.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8087/",
+          "provider_name": "Anastasis 2",
+          "provider_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_01": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8086/",
+          "provider_name": "Anastasis 1",
+          "provider_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+        }
+      }
+    ]
+  },
+  "identity_attributes": {
+    "full_name": "Max Musterman",
+    "ahv_number": "756.9217.0769.85",
+    "birth_year": 2000,
+    "birth_month": 1,
+    "birth_day": 1
+  },
+  "authentication_methods": [
+    {
+      "method": "question",
+      "data": {
+        "question": "Whats your name?",
+        "answer": "Hans"
+      }
+    },
+    {
+      "method": "question",
+      "data": {
+        "question": "How old are you?",
+        "answer": "123"
+      }
+    },
+    {
+      "method": "question",
+      "data": {
+        "question": "Where do you live?",
+        "answer": "Mars"
+      }
+    }
+  ],
+  "policies": [
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 0,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 1,
+          "provider": "anastasis_01"
+        }
+      ]
+    },
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 0,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 2,
+          "provider": "anastasis_01"
+        }
+      ]
+    },
+    {
+      "recovery_cost": "TESTKUDOS:0",
+      "methods": [
+        {
+          "authentication_method": 1,
+          "provider": "anastasis_02"
+        },
+        {
+          "authentication_method": 2,
+          "provider": "anastasis_01"
+        }
+      ]
+    }
+  ],
+  "truths": [
+    {
+      "auth_method_index": 0,
+      "backend_url": "localhost:8087/",
+      "backend_id": "anastasis_02",
+      "method": "question",
+      "truth_data": {
+        "question": "Whats your name?",
+        "answer": "Hans"
+      },
+      "instructions": "Whats your name?",
+      "mime_type": "text",
+      "backend_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+    },
+    {
+      "auth_method_index": 1,
+      "backend_url": "localhost:8086/",
+      "backend_id": "anastasis_01",
+      "method": "question",
+      "truth_data": {
+        "question": "How old are you?",
+        "answer": "123"
+      },
+      "instructions": "How old are you?",
+      "mime_type": "text",
+      "backend_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+    },
+    {
+      "auth_method_index": 2,
+      "backend_url": "localhost:8086/",
+      "backend_id": "anastasis_01",
+      "method": "question",
+      "truth_data": {
+        "question": "Where do you live?",
+        "answer": "Mars"
+      },
+      "instructions": "Where do you live?",
+      "mime_type": "text",
+      "backend_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+    },
+    {
+      "auth_method_index": 1,
+      "backend_url": "localhost:8087/",
+      "backend_id": "anastasis_02",
+      "method": "question",
+      "truth_data": {
+        "question": "How old are you?",
+        "answer": "123"
+      },
+      "instructions": "How old are you?",
+      "mime_type": "text",
+      "backend_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+    }
+  ]
+}
\ No newline at end of file
diff --git a/contrib/test_resources/test_reducer_stateUACSTATE 
b/contrib/test_resources/test_reducer_stateUACSTATE
new file mode 100644
index 0000000..f4a43a7
--- /dev/null
+++ b/contrib/test_resources/test_reducer_stateUACSTATE
@@ -0,0 +1,116 @@
+{
+  "backup_state": "USER_ATTRIBUTES_COLLECTING",
+  "continents": [
+    "Europe",
+    "North_America"
+  ],
+  "selected_continent": "Europe",
+  "countries": [
+    {
+      "code": "ch",
+      "name": "Switzerland",
+      "continent": "Europe",
+      "name_i18n": {
+        "de_DE": "Schweiz",
+        "de_CH": "Schwiiz",
+        "fr": "Suisse",
+        "en": "Swiss"
+      },
+      "currency": "TESTKUDOS"
+    },
+    {
+      "code": "de",
+      "name": "Germany",
+      "continent": "Europe",
+      "continent_i18n": {
+        "de": "Europa"
+      },
+      "name_i18n": {
+        "de_DE": "Deutschland",
+        "de_CH": "Deutschland",
+        "fr": "Allemagne",
+        "en": "Germany"
+      },
+      "currency": "TESTKUDOS"
+    }
+  ],
+  "selected_country": "ch",
+  "currency": "TESTKUDOS",
+  "required_attributes": [
+    {
+      "type": "string",
+      "name": "full_name",
+      "label": "Full name",
+      "label_i18n": {
+        "de_DE": "Vollstaendiger Name",
+        "de_CH": "Vollstaendiger Name"
+      },
+      "widget": "anastasis_gtk_ia_full_name"
+    },
+    {
+      "type": "date",
+      "name": "birthdate",
+      "label": "Birthdate",
+      "label_i18n": {
+        "de_CH": "Geburtsdatum"
+      },
+      "widget": "anastasis_gtk_ia_birthdate"
+    },
+    {
+      "type": "string",
+      "name": "ahv_number",
+      "label": "AHV number",
+      "label_i18n": {
+        "de_DE": "AHV-Nummer",
+        "de_CH": "AHV-Nummer"
+      },
+      "widget": "anastasis_gtk_ia_ahv",
+      "validation-regex": "^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
+      "validation-logic": "CH_AVH_check"
+    }
+  ],
+  "authentication_providers": {
+    "question": [
+      {
+        "anastasis_04": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:0",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8089/",
+          "provider_name": "Anastasis 4",
+          "provider_salt": "8HAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_03": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8088/",
+          "provider_name": "Anastasis 3",
+          "provider_salt": "8DAPCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_02": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:1.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8087/",
+          "provider_name": "Anastasis 2",
+          "provider_salt": "89APCKSH9D3MYJTS9536RHJHCW"
+        }
+      },
+      {
+        "anastasis_01": {
+          "method_cost": "TESTKUDOS:0",
+          "annual_cost": "TESTKUDOS:4.99",
+          "insurance": "TESTKUDOS:1",
+          "provider_url": "localhost:8086/",
+          "provider_name": "Anastasis 1",
+          "provider_salt": "85APCKSH9D3MYJTS9536RHJHCW"
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]