On Fri, 25 Apr 2014 17:16:48 +0200
Misnyovszki Adam <amisn...@redhat.com> wrote:

> Hi,
> this patch adds some static test data for the webui otptoken part.
> Adam

Attached corrected DN's.
Thanks
Adam
>From e5816ae2dca48841c7c3b3edf591257b89fcb49b Mon Sep 17 00:00:00 2001
From: Adam Misnyovszki <amisn...@redhat.com>
Date: Fri, 25 Apr 2014 16:33:11 +0200
Subject: [PATCH] webui OTP token test data added

---
 install/ui/test/data/otptoken_add.json         | 43 +++++++++++++++++++
 install/ui/test/data/otptoken_batch_del.json   | 14 +++++++
 install/ui/test/data/otptoken_batch_mod.json   | 34 +++++++++++++++
 install/ui/test/data/otptoken_del.json         | 11 +++++
 install/ui/test/data/otptoken_find.json        | 54 ++++++++++++++++++++++++
 install/ui/test/data/otptoken_find_pkeys.json  | 17 ++++++++
 install/ui/test/data/otptoken_get_records.json | 57 ++++++++++++++++++++++++++
 install/ui/test/data/otptoken_mod.json         |  8 ++++
 install/ui/test/data/otptoken_show.json        | 51 +++++++++++++++++++++++
 9 files changed, 289 insertions(+)
 create mode 100644 install/ui/test/data/otptoken_add.json
 create mode 100644 install/ui/test/data/otptoken_batch_del.json
 create mode 100644 install/ui/test/data/otptoken_batch_mod.json
 create mode 100644 install/ui/test/data/otptoken_del.json
 create mode 100644 install/ui/test/data/otptoken_find.json
 create mode 100644 install/ui/test/data/otptoken_find_pkeys.json
 create mode 100644 install/ui/test/data/otptoken_get_records.json
 create mode 100644 install/ui/test/data/otptoken_mod.json
 create mode 100644 install/ui/test/data/otptoken_show.json

diff --git a/install/ui/test/data/otptoken_add.json b/install/ui/test/data/otptoken_add.json
new file mode 100644
index 0000000000000000000000000000000000000000..96170d4419ef92ed2f7768ec023c26b35e14548d
--- /dev/null
+++ b/install/ui/test/data/otptoken_add.json
@@ -0,0 +1,43 @@
+{
+    "error": null,
+    "id": null,
+    "result": {
+        "result": {
+            "dn": "ipatokenuniqueid=footoken,cn=otp,dc=example,dc=com",
+            "ipatokenmodel": [
+                "totp"
+            ],
+            "ipatokenotpalgorithm": [
+                "sha1"
+            ],
+            "ipatokenotpdigits": [
+                "6"
+            ],
+            "ipatokenotpkey": [
+                {
+                    "__base64__": "2TUYXOVTaZf/Og=="
+                }
+            ],
+            "ipatokentotpclockoffset": [
+                "0"
+            ],
+            "ipatokentotptimestep": [
+                "30"
+            ],
+            "ipatokenuniqueid": [
+                "footoken"
+            ],
+            "ipatokenvendor": [
+                "FreeIPA"
+            ],
+            "objectclass": [
+                "top",
+                "ipatokentotp",
+                "ipatoken"
+            ],
+            "uri": "otpauth://totp/EXAMPLE.COM:footoken?digits=6&secret=3E2RQXHFKNUZP7Z2&period=30&algorithm=sha1&issuer=EXAMPLE.COM"
+        },
+        "summary": "Added OTP token \"footoken\"",
+        "value": "footoken"
+    }
+}
diff --git a/install/ui/test/data/otptoken_batch_del.json b/install/ui/test/data/otptoken_batch_del.json
new file mode 100644
index 0000000000000000000000000000000000000000..8fb6d701d2f4741922482127e54f9a9b6503d43c
--- /dev/null
+++ b/install/ui/test/data/otptoken_batch_del.json
@@ -0,0 +1,14 @@
+{
+    "error": null,
+    "id": null,
+    "result": {
+        "count": 1,
+        "results": [
+            {
+                "error": "footoken: OTP token not found",
+                "error_code": 4001,
+                "error_name": "NotFound"
+            }
+        ]
+    }
+}
\ No newline at end of file
diff --git a/install/ui/test/data/otptoken_batch_mod.json b/install/ui/test/data/otptoken_batch_mod.json
new file mode 100644
index 0000000000000000000000000000000000000000..63b99b684ee2ee8aaede06f4f5f6d8080c71fe8c
--- /dev/null
+++ b/install/ui/test/data/otptoken_batch_mod.json
@@ -0,0 +1,34 @@
+{
+    "error": null,
+    "id": null,
+    "result": {
+        "count": 1,
+        "results": [
+            {
+                "error": null,
+                "result": {
+                    "description": [
+                        "Description"
+                    ],
+                    "ipatokendisabled": [
+                        "FALSE"
+                    ],
+                    "ipatokenmodel": [
+                        "totp"
+                    ],
+                    "ipatokenowner": [
+                        "admin"
+                    ],
+                    "ipatokenuniqueid": [
+                        "10bd43b5-3204-4695-9225-91064f6c77b3"
+                    ],
+                    "ipatokenvendor": [
+                        "FreeIPA"
+                    ]
+                },
+                "summary": "Modified OTP token \"10bd43b5-3204-4695-9225-91064f6c77b3\"",
+                "value": "10bd43b5-3204-4695-9225-91064f6c77b3"
+            }
+        ]
+    }
+}
\ No newline at end of file
diff --git a/install/ui/test/data/otptoken_del.json b/install/ui/test/data/otptoken_del.json
new file mode 100644
index 0000000000000000000000000000000000000000..6e00306dcc542d8b82eadbc195aa3205a45ceaef
--- /dev/null
+++ b/install/ui/test/data/otptoken_del.json
@@ -0,0 +1,11 @@
+{
+    "error": null,
+    "id": null,
+    "result": {
+        "result": {
+            "failed": ""
+        },
+        "summary": "Deleted OTP token \"footoken\"",
+        "value": "footoken"
+    }
+}
\ No newline at end of file
diff --git a/install/ui/test/data/otptoken_find.json b/install/ui/test/data/otptoken_find.json
new file mode 100644
index 0000000000000000000000000000000000000000..d31760073b370b8a24e911cddc5aed440380ab7f
--- /dev/null
+++ b/install/ui/test/data/otptoken_find.json
@@ -0,0 +1,54 @@
+{
+    "error": null,
+    "id": null,
+    "result": {
+        "count": 1,
+        "result": [
+            {
+                "description": [
+                    "Description"
+                ],
+                "dn": "ipatokenuniqueid=10bd43b5-3204-4695-9225-91064f6c77b3,cn=otp,dc=example,dc=com",
+                "ipatokendisabled": [
+                    "TRUE"
+                ],
+                "ipatokenmodel": [
+                    "totp"
+                ],
+                "ipatokenotpalgorithm": [
+                    "sha1"
+                ],
+                "ipatokenotpdigits": [
+                    "6"
+                ],
+                "ipatokenotpkey": [
+                    {
+                        "__base64__": "++R6gVcVPHzz3Q=="
+                    }
+                ],
+                "ipatokenowner": [
+                    "admin"
+                ],
+                "ipatokentotpclockoffset": [
+                    "0"
+                ],
+                "ipatokentotptimestep": [
+                    "30"
+                ],
+                "ipatokenuniqueid": [
+                    "10bd43b5-3204-4695-9225-91064f6c77b3"
+                ],
+                "ipatokenvendor": [
+                    "FreeIPA"
+                ],
+                "objectclass": [
+                    "top",
+                    "ipatokentotp",
+                    "ipatoken"
+                ]
+            }
+        ],
+        "summary": "1 OTP token matched",
+        "truncated": false
+    }
+}
\ No newline at end of file
diff --git a/install/ui/test/data/otptoken_find_pkeys.json b/install/ui/test/data/otptoken_find_pkeys.json
new file mode 100644
index 0000000000000000000000000000000000000000..5b7d788a1aa41401e4a1bfb74fa784eef232e7e5
--- /dev/null
+++ b/install/ui/test/data/otptoken_find_pkeys.json
@@ -0,0 +1,17 @@
+{
+    "error": null,
+    "id": null,
+    "result": {
+        "count": 1,
+        "result": [
+            {
+                "dn": "ipatokenuniqueid=10bd43b5-3204-4695-9225-91064f6c77b3,cn=otp,dc=example,dc=com",
+                "ipatokenuniqueid": [
+                    "10bd43b5-3204-4695-9225-91064f6c77b3"
+                ]
+            }
+        ],
+        "summary": "1 OTP token matched",
+        "truncated": false
+    }
+}
\ No newline at end of file
diff --git a/install/ui/test/data/otptoken_get_records.json b/install/ui/test/data/otptoken_get_records.json
new file mode 100644
index 0000000000000000000000000000000000000000..b3e746db5a346cc9b3bece805572cd77fc3472ef
--- /dev/null
+++ b/install/ui/test/data/otptoken_get_records.json
@@ -0,0 +1,57 @@
+{
+    "error": null,
+    "id": null,
+    "result": {
+        "count": 1,
+        "results": [
+            {
+                "error": null,
+                "result": {
+                    "description": [
+                        "Description"
+                    ],
+                    "dn": "ipatokenuniqueid=10bd43b5-3204-4695-9225-91064f6c77b3,cn=otp,dc=example,dc=com",
+                    "ipatokendisabled": [
+                        "TRUE"
+                    ],
+                    "ipatokenmodel": [
+                        "totp"
+                    ],
+                    "ipatokenotpalgorithm": [
+                        "sha1"
+                    ],
+                    "ipatokenotpdigits": [
+                        "6"
+                    ],
+                    "ipatokenotpkey": [
+                        {
+                            "__base64__": "++R6gVcVPHzz3Q=="
+                        }
+                    ],
+                    "ipatokenowner": [
+                        "admin"
+                    ],
+                    "ipatokentotpclockoffset": [
+                        "0"
+                    ],
+                    "ipatokentotptimestep": [
+                        "30"
+                    ],
+                    "ipatokenuniqueid": [
+                        "10bd43b5-3204-4695-9225-91064f6c77b3"
+                    ],
+                    "ipatokenvendor": [
+                        "FreeIPA"
+                    ],
+                    "objectclass": [
+                        "top",
+                        "ipatokentotp",
+                        "ipatoken"
+                    ]
+                },
+                "summary": null,
+                "value": "10bd43b5-3204-4695-9225-91064f6c77b3"
+            }
+        ]
+    }
+}
\ No newline at end of file
diff --git a/install/ui/test/data/otptoken_mod.json b/install/ui/test/data/otptoken_mod.json
new file mode 100644
index 0000000000000000000000000000000000000000..7ab858be50aefa98dba6d9e264bbdf8aba1a2a72
--- /dev/null
+++ b/install/ui/test/data/otptoken_mod.json
@@ -0,0 +1,8 @@
+{
+    "error": {
+        "code": 4001,
+        "name": "NotFound"
+    },
+    "id": null,
+    "result": null
+}
diff --git a/install/ui/test/data/otptoken_show.json b/install/ui/test/data/otptoken_show.json
new file mode 100644
index 0000000000000000000000000000000000000000..96c149d9dcc1fb1592d55ca7ca63b93d8fec9c18
--- /dev/null
+++ b/install/ui/test/data/otptoken_show.json
@@ -0,0 +1,51 @@
+{
+    "error": null,
+    "id": null,
+    "result": {
+        "result": {
+            "description": [
+                "Description"
+            ],
+            "dn": "ipatokenuniqueid=10bd43b5-3204-4695-9225-91064f6c77b3,cn=otp,dc=example,dc=com",
+            "ipatokendisabled": [
+                "TRUE"
+            ],
+            "ipatokenmodel": [
+                "totp"
+            ],
+            "ipatokenotpalgorithm": [
+                "sha1"
+            ],
+            "ipatokenotpdigits": [
+                "6"
+            ],
+            "ipatokenotpkey": [
+                {
+                    "__base64__": "++R6gVcVPHzz3Q=="
+                }
+            ],
+            "ipatokenowner": [
+                "admin"
+            ],
+            "ipatokentotpclockoffset": [
+                "0"
+            ],
+            "ipatokentotptimestep": [
+                "30"
+            ],
+            "ipatokenuniqueid": [
+                "10bd43b5-3204-4695-9225-91064f6c77b3"
+            ],
+            "ipatokenvendor": [
+                "FreeIPA"
+            ],
+            "objectclass": [
+                "top",
+                "ipatokentotp",
+                "ipatoken"
+            ]
+        },
+        "summary": null,
+        "value": "10bd43b5-3204-4695-9225-91064f6c77b3"
+    }
+}
\ No newline at end of file
-- 
1.9.0

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to