diff options
Diffstat (limited to 'install/static/test')
-rw-r--r-- | install/static/test/all_tests.html | 4 | ||||
-rw-r--r-- | install/static/test/association_tests.html | 2 | ||||
-rwxr-xr-x | install/static/test/certificate_tests.html | 24 | ||||
-rwxr-xr-x | install/static/test/certificate_tests.js | 79 | ||||
-rw-r--r-- | install/static/test/data/cert_show.json | 1 | ||||
-rw-r--r-- | install/static/test/data/host_show.json | 14 | ||||
-rw-r--r-- | install/static/test/details_tests.html | 2 | ||||
-rw-r--r-- | install/static/test/entity_tests.html | 2 | ||||
-rw-r--r-- | install/static/test/index.html | 1 | ||||
-rw-r--r-- | install/static/test/ipa_tests.html | 2 | ||||
-rw-r--r-- | install/static/test/navigation_tests.html | 2 |
11 files changed, 125 insertions, 8 deletions
diff --git a/install/static/test/all_tests.html b/install/static/test/all_tests.html index aede08e7e..50c5155dc 100644 --- a/install/static/test/all_tests.html +++ b/install/static/test/all_tests.html @@ -14,11 +14,13 @@ <script type="text/javascript" src="../entity.js"></script> <script type="text/javascript" src="../associate.js"></script> <script type="text/javascript" src="../navigation.js"></script> + <script type="text/javascript" src="../certificate.js"></script> <script type="text/javascript" src="ipa_tests.js"></script> <script type="text/javascript" src="details_tests.js"></script> <script type="text/javascript" src="entity_tests.js"></script> <script type="text/javascript" src="association_tests.js"></script> <script type="text/javascript" src="navigation_tests.js"></script> + <script type="text/javascript" src="certificate_tests.js"></script> </head> <body> <h1 id="qunit-header">Complete Test Suite</h1> @@ -26,6 +28,6 @@ <div id="qunit-testrunner-toolbar"></div> <h2 id="qunit-userAgent"></h2> <ol id="qunit-tests"></ol> - <div id="qunit-fixture">test markup</div> + <div id="qunit-fixture"></div> </body> </html> diff --git a/install/static/test/association_tests.html b/install/static/test/association_tests.html index 5b5fb7177..40b3c208d 100644 --- a/install/static/test/association_tests.html +++ b/install/static/test/association_tests.html @@ -18,6 +18,6 @@ <div id="qunit-testrunner-toolbar"></div> <h2 id="qunit-userAgent"></h2> <ol id="qunit-tests"></ol> - <div id="qunit-fixture">test markup</div> + <div id="qunit-fixture"></div> </body> </html> diff --git a/install/static/test/certificate_tests.html b/install/static/test/certificate_tests.html new file mode 100755 index 000000000..90f09b21a --- /dev/null +++ b/install/static/test/certificate_tests.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<html> +<head> + <title>Certificate Test Suite</title> + <link rel="stylesheet" href="qunit.css" type="text/css" media="screen"> + <script type="text/javascript" src="qunit.js"></script> + <script type="text/javascript" src="../jquery.js"></script> + <script type="text/javascript" src="../ipa.js"></script> + <script type="text/javascript" src="../details.js"></script> + <script type="text/javascript" src="../search.js"></script> + <script type="text/javascript" src="../add.js"></script> + <script type="text/javascript" src="../navigation.js"></script> + <script type="text/javascript" src="../certificate.js"></script> + <script type="text/javascript" src="certificate_tests.js"></script> +</head> +<body> + <h1 id="qunit-header">Certificate Test Suite</h1> + <h2 id="qunit-banner"></h2> + <div id="qunit-testrunner-toolbar"></div> + <h2 id="qunit-userAgent"></h2> + <ol id="qunit-tests"></ol> + <div id="qunit-fixture"></div> +</body> +</html> diff --git a/install/static/test/certificate_tests.js b/install/static/test/certificate_tests.js new file mode 100755 index 000000000..6ada6e401 --- /dev/null +++ b/install/static/test/certificate_tests.js @@ -0,0 +1,79 @@ +/* Authors: + * Endi Sukma Dewata <edewata@redhat.com> + * + * Copyright (C) 2010 Red Hat + * see file 'COPYING' for use and warranty information + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 only + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +test("Testing certificate_parse_dn().", function() { + + same( + certificate_parse_dn(), {}, + "Checking certificate_parse_dn()" + ); + + same( + certificate_parse_dn(''), {}, + "Checking certificate_parse_dn('')" + ); + + same( + certificate_parse_dn('c=US'), {'c': 'US'}, + "Checking certificate_parse_dn('c=US')" + ); + + same( + certificate_parse_dn('st=TX,c=US'), {'st': 'TX','c': 'US'}, + "Checking certificate_parse_dn('st=TX,c=US')" + ); + + same( + certificate_parse_dn('c=US,st=TX'), {'st': 'TX','c': 'US'}, + "Checking certificate_parse_dn('c=US,st=TX')" + ); + + same( + certificate_parse_dn(' st = New Mexico , c = US '), {'st': 'New Mexico','c': 'US'}, + "Checking certificate_parse_dn(' st = New Mexico , c = US ')" + ); + + same( + certificate_parse_dn('ST=TX,C=US'), {'st': 'TX','c': 'US'}, + "Checking certificate_parse_dn('ST=TX,C=US')" + ); + + same( + certificate_parse_dn('cn=dev.example.com,ou=Engineering,o=Example,l=Austin,ST=TX,C=US'), + { 'cn': 'dev.example.com', + 'ou': 'Engineering', + 'o': 'Example', + 'l': 'Austin', + 'st': 'TX', + 'c': 'US' + }, + "Checking certificate_parse_dn('cn=dev.example.com,ou=Engineering,o=Example,l=Austin,ST=TX,C=US')" + ); + + same( + certificate_parse_dn('cn=John Smith,ou=Developers,ou=Users,dc=example,dc=com'), + { + 'cn': 'John Smith', + 'ou': ['Developers','Users'], + 'dc': ['example', 'com'] + }, + "Checking certificate_parse_dn('cn=John Smith,ou=Developers,ou=Users,dc=example,dc=com')" + ); +}); diff --git a/install/static/test/data/cert_show.json b/install/static/test/data/cert_show.json index f8996715c..71d895f05 100644 --- a/install/static/test/data/cert_show.json +++ b/install/static/test/data/cert_show.json @@ -6,7 +6,6 @@ "certificate": "MIICAjCCAWugAwIBAgICBAswDQYJKoZIhvcNAQEFBQAwKTEnMCUGA1UEAxMeSVBBIFRlc3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTEwMTAwNzIzMzk0NFoXDTE1MTAwNzIzMzk0NFowKDEMMAoGA1UECgwDSVBBMRgwFgYDVQQDDA9kZXYuZXhhbXBsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOTXyj8grVB7Rj95RFawgdwn9OYZ03LWHZ+HMYggu2/xCCrUrdThP14YBlVqZumjVJSclj6T4ACjjdPJq9JTTmx7gMizDTReus7IPlS6fCxb5v5whQJZsEksXL04OxUMl25euPRFkYcTK1rdW47+AkG10j1qeNW+B6CpdQGR6eM/AgMBAAGjOjA4MBEGCWCGSAGG+EIBAQQEAwIGQDATBgNVHSUEDDAKBggrBgEFBQcDATAOBgNVHQ8BAf8EBAMCBPAwDQYJKoZIhvcNAQEFBQADgYEASIhq723VL5xP0q51MYXFlGU1boD7pPD1pIQspD/MjCIEupcbH2kAo4wf+EiKsXR0rs+WZkaSgvFqaM4OQ2kWSFTiqmFXFDBEi6EFr68yLg7IpQpNTzVBXERd8B4GwNL9wrRw60jPXlUK29DPBsdGq8fDgX18l39wKkWXv7p1to4=", "issuer": "CN=Certificate Authority,O=IPA", "md5_fingerprint": "08:86:a9:f9:87:af:0d:d7:42:01:e0:5f:12:9b:32:7f", - "revocation_reason": 6, "serial_number": "1", "sha1_fingerprint": "b8:4c:4b:79:4f:13:03:79:47:08:fa:6b:52:63:3d:f9:15:8e:7e:dc", "subject": "CN=dev.example.com,O=IPA", diff --git a/install/static/test/data/host_show.json b/install/static/test/data/host_show.json index 64a7fb317..b0916215a 100644 --- a/install/static/test/data/host_show.json +++ b/install/static/test/data/host_show.json @@ -14,6 +14,7 @@ "ipauniqueid": [ "b54b73a8-8ba8-11df-80bc-00163e26b89e" ], + "issuer": "CN=IPA Test Certificate Authority", "krbextradata": [ { "__base64__": "AAKOoTdMYWRtaW4vYWRtaW5ASURNLkxBQi5CT1MuUkVESEFULkNPTQA=" @@ -34,6 +35,7 @@ "managedby": [ "fqdn=vm-121.idm.lab.bos.redhat.com,cn=computers,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com" ], + "md5_fingerprint": "08:86:a9:f9:87:af:0d:d7:42:01:e0:5f:12:9b:32:7f", "memberof": [], "objectclass": [ "top", @@ -46,9 +48,19 @@ "krbprincipal", "krbticketpolicyaux" ], + "serial_number": "1", "serverhostname": [ "vm-121" - ] + ], + "sha1_fingerprint": "b8:4c:4b:79:4f:13:03:79:47:08:fa:6b:52:63:3d:f9:15:8e:7e:dc", + "subject": "CN=dev.example.com,O=IPA", + "usercertificate": [ + { + "__base64__": "MIICAjCCAWugAwIBAgICBAswDQYJKoZIhvcNAQEFBQAwKTEnMCUGA1UEAxMeSVBBIFRlc3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTEwMTAwNzIzMzk0NFoXDTE1MTAwNzIzMzk0NFowKDEMMAoGA1UECgwDSVBBMRgwFgYDVQQDDA9kZXYuZXhhbXBsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOTXyj8grVB7Rj95RFawgdwn9OYZ03LWHZ+HMYggu2/xCCrUrdThP14YBlVqZumjVJSclj6T4ACjjdPJq9JTTmx7gMizDTReus7IPlS6fCxb5v5whQJZsEksXL04OxUMl25euPRFkYcTK1rdW47+AkG10j1qeNW+B6CpdQGR6eM/AgMBAAGjOjA4MBEGCWCGSAGG+EIBAQQEAwIGQDATBgNVHSUEDDAKBggrBgEFBQcDATAOBgNVHQ8BAf8EBAMCBPAwDQYJKoZIhvcNAQEFBQADgYEASIhq723VL5xP0q51MYXFlGU1boD7pPD1pIQspD/MjCIEupcbH2kAo4wf+EiKsXR0rs+WZkaSgvFqaM4OQ2kWSFTiqmFXFDBEi6EFr68yLg7IpQpNTzVBXERd8B4GwNL9wrRw60jPXlUK29DPBsdGq8fDgX18l39wKkWXv7p1to4=" + } + ], + "valid_not_after": "Tue Oct 13 01:59:32 2015 UTC", + "valid_not_before": "Wed Oct 13 01:59:32 2010 UTC" }, "summary": null, "value": "vm-121.idm.lab.bos.redhat.com" diff --git a/install/static/test/details_tests.html b/install/static/test/details_tests.html index 7c323610c..e96fa4b72 100644 --- a/install/static/test/details_tests.html +++ b/install/static/test/details_tests.html @@ -19,6 +19,6 @@ <div id="qunit-testrunner-toolbar"></div> <h2 id="qunit-userAgent"></h2> <ol id="qunit-tests"></ol> - <div id="qunit-fixture">test markup</div> + <div id="qunit-fixture"></div> </body> </html> diff --git a/install/static/test/entity_tests.html b/install/static/test/entity_tests.html index a6d3f72fe..b8da0f444 100644 --- a/install/static/test/entity_tests.html +++ b/install/static/test/entity_tests.html @@ -19,6 +19,6 @@ <div id="qunit-testrunner-toolbar"></div> <h2 id="qunit-userAgent"></h2> <ol id="qunit-tests"></ol> - <div id="qunit-fixture">test markup</div> + <div id="qunit-fixture"></div> </body> </html> diff --git a/install/static/test/index.html b/install/static/test/index.html index a71ee60fd..5467a683f 100644 --- a/install/static/test/index.html +++ b/install/static/test/index.html @@ -29,6 +29,7 @@ <li><a href="details_tests.html">Details Test Suite</a> <li><a href="association_tests.html">Association Test Suite</a> <li><a href="navigation_tests.html">Navigation Test Suite</a> + <li><a href="certificate_tests.html">Certificate Test Suite</a> </ul> </div> diff --git a/install/static/test/ipa_tests.html b/install/static/test/ipa_tests.html index dfe2720a5..3f3c16869 100644 --- a/install/static/test/ipa_tests.html +++ b/install/static/test/ipa_tests.html @@ -17,6 +17,6 @@ <div id="qunit-testrunner-toolbar"></div> <h2 id="qunit-userAgent"></h2> <ol id="qunit-tests"></ol> - <div id="qunit-fixture">test markup</div> + <div id="qunit-fixture"></div> </body> </html> diff --git a/install/static/test/navigation_tests.html b/install/static/test/navigation_tests.html index dbb562f11..fa911d6e6 100644 --- a/install/static/test/navigation_tests.html +++ b/install/static/test/navigation_tests.html @@ -16,6 +16,6 @@ <div id="qunit-testrunner-toolbar"></div> <h2 id="qunit-userAgent"></h2> <ol id="qunit-tests"></ol> - <div id="qunit-fixture">test markup</div> + <div id="qunit-fixture"></div> </body> </html> |