Imported Debian patch 4.8.10-2

This commit is contained in:
Timo Aaltonen
2020-11-23 20:48:56 +02:00
committed by Mario Fetka
parent 8bc559c5a1
commit 358acdd85f
917 changed files with 1185414 additions and 1069733 deletions

View File

@@ -35,7 +35,8 @@
'test/utils_tests',
'test/build_tests',
'test/binding_tests',
], function(om, ipa, details, entity, as, cert, aci, wid, ip, ut, bt, bi){
'test/topology_tests',
], function(om, ipa, details, entity, as, cert, aci, wid, ip, ut, bt, bi, topo){
QUnit.start();
om();
ipa();
@@ -49,6 +50,7 @@
ut();
bt();
bi();
topo();
});
</script>
</head>

View File

@@ -58,6 +58,8 @@
"type_otp": "Two factor authentication (password + OTP)",
"type_password": "Password",
"type_radius": "RADIUS",
"type_pkinit": "PKINIT",
"type_hardened": "Hardened Password (by SPAKE or FAST)",
"user_tooltip": "<p>Per-user setting, overwrites the global setting if any option is checked.</p><p><strong>Password + Two-factor:</strong> LDAP and Kerberos allow authentication with either one of the authentication types but Kerberos uses pre-authentication method which requires to use armor ccache.</p><p><strong>RADIUS with another type:</strong> Kerberos always use RADIUS, but LDAP never does. LDAP only recognize the password and two-factor authentication options.</p>"
},
"buttons": {
@@ -204,7 +206,7 @@
"logout": "Log out",
"logout_error": "Log out error",
"password": "Password",
"password_and_otp": "Password or Password+One-Time-Password",
"password_and_otp": "Password or Password+One-Time Password",
"sync_otp_token": "Sync OTP Token",
"username": "Username"
},
@@ -457,14 +459,14 @@
"keytab": "Kerberos Key",
"keytab_missing": "Kerberos Key Not Present",
"keytab_present": "Kerberos Key Present, Host Provisioned",
"password": "One-Time-Password",
"password_missing": "One-Time-Password Not Present",
"password_present": "One-Time-Password Present",
"password": "One-Time Password",
"password_missing": "One-Time Password Not Present",
"password_present": "One-Time Password Present",
"password_reset_button": "Reset OTP",
"password_reset_title": "Reset One-Time-Password",
"password_reset_title": "Reset One-Time Password",
"password_set_button": "Set OTP",
"password_set_success": "OTP set",
"password_set_title": "Set One-Time-Password",
"password_set_title": "Set One-Time Password",
"status": "Status",
"unprovision": "Unprovision",
"unprovision_confirmation": "Are you sure you want to unprovision this host?",
@@ -745,13 +747,14 @@
"new_password": "New Password",
"new_password_required": "New password is required",
"otp": "OTP",
"otp_info": "<i class=\"fa fa-info-circle\"></i> <strong>One-Time-Password(OTP):</strong> Generate new OTP code for each OTP field.",
"otp_long": "One-Time-Password",
"otp_info": "<i class=\"fa fa-info-circle\"></i> <strong>OTP (One-Time Password):</strong> Generate new OTP code for each OTP field.",
"otp_reset_info": "<i class=\"fa fa-info-circle\"></i> <strong>OTP (One-Time Password):</strong> Leave blank if you are not using OTP tokens for authentication.",
"otp_long": "One-Time Password",
"otp_sync_fail": "Token synchronization failed",
"otp_sync_invalid": "The username, password or token codes are not correct",
"otp_sync_success": "Token was synchronized",
"password": "Password",
"password_and_otp": "Password or Password+One-Time-Password",
"password_and_otp": "Password or Password+One-Time Password",
"password_change_complete": "Password change complete",
"password_must_match": "Passwords must match",
"reset_failure": "Password reset was not successful.",
@@ -842,4 +845,4 @@
}
},
"version": "4.6.90.pre2"
}
}

View File

@@ -37,6 +37,7 @@
<li><a href="utils_tests.html">Utils Test Suite</a>
<li><a href="build_tests.html">Build Test Suite</a>
<li><a href="binding_tests.html">Binding Test Suite</a>
<li><a href="topology_tests.html">Topology Test Suite</a>
</ul>
</div>

View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>Topology 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="../js/libs/loader.js"></script>
<script type="text/javascript" src="../js/libs/jquery.js"></script>
<script type="text/javascript" src="../js/libs/jquery.ordered-map.js"></script>
<script type="text/javascript" src="config.js"></script>
<script type="text/javascript" src="../js/dojo/dojo.js"></script>
<script type="text/javascript">
require(['test/topology_tests'], function(tests){ tests() });
</script>
</head>
<body>
<h1 id="qunit-header">Topology 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>

View File

@@ -0,0 +1,158 @@
/**
* Copyright (C) 2019 FreeIPA Contributors see COPYING for license
*/
define([
'freeipa/ipa',
'freeipa/topology',
'freeipa/jquery'],
function(IPA, topology, $) {
return function() {
var widget;
function inject_data(widget, data) {
widget._get_data = function() {
return data;
};
}
QUnit.module('topology', {
beforeEach: function(assert) {
widget = new topology.TopologyGraphWidget(
topology.topology_graph_facet_spec
);
widget.render();
}
});
QUnit.test('Testing TopoGraph nodes', function(assert) {
var nodes = [
{ id: 'master.ipa.test' },
{ id: 'replica.ipa.test' }
];
var suffixes = [
{ cn: ['ca'] },
{ cn: ['domain'] }
];
inject_data(widget, { nodes: nodes, links: [], suffixes: suffixes });
widget.update();
assert.ok($('circle.node', widget.el).length === nodes.length,
'Checking rendered nodes count');
assert.ok($('text.id:eq(0)', widget.el).text() === 'master',
'Checking "master" node label');
assert.ok($('text.id:eq(1)', widget.el).text() === 'replica',
'Checking "replica" node label');
assert.ok($('text.suffix:eq(0)', widget.el).text() === 'ca',
'Checking "ca" suffix');
assert.ok($('text.suffix:eq(1)', widget.el).text() === 'domain',
'Checking "domain" suffix');
});
QUnit.test('Testing TopoGraph links', function(assert) {
var nodes = [
{ id: 'master.ipa.test', targets: { 'replica.ipa.test': [] } },
{ id: 'replica.ipa.test' }
];
var suffixes = [
{ cn: ['ca'] },
{ cn: ['domain'] }
];
var links = [{
source: 0,
target: 1,
left: false,
right: true,
suffix: suffixes[0]
}];
inject_data(widget, { nodes: nodes, links: links, suffixes: suffixes });
widget.update();
assert.ok($('circle.node', widget.el).length === nodes.length,
'Checking rendered nodes count');
var rendered_links = $('path.link', widget.el).not('.dragline');
assert.ok(rendered_links.length === 1,
'Checking right direction link is rendered');
var marker = rendered_links.first().css('marker-end');
assert.ok(marker && marker !== 'none',
'Checking right direction link has proper marker');
links.push({
source: 0,
target: 1,
left: true,
right: false,
suffix: suffixes[1]
})
inject_data(widget, {
nodes: nodes,
links: links,
suffixes: suffixes
});
widget.update();
rendered_links = $('path.link', widget.el).not('.dragline')
assert.ok(rendered_links.length === 2,
'Checking left direction link is rendered');
marker = rendered_links.last().css('marker-start');
assert.ok(marker && marker !== 'none',
'Checking left direction link has proper marker');
});
QUnit.test('Testing TopoGraph for multiple DNS zones', function(assert) {
var nodes = [
{ id: 'master.ipa.zone1' },
{ id: 'replica.ipa.zone1' },
{ id: 'master.ipa.zone2' },
{ id: 'master.ipa.zone1.common' },
{ id: 'replica.ipa.zone2.common' },
];
var suffixes = [
{ cn: ['ca'] },
{ cn: ['domain'] }
];
inject_data(widget, { nodes: nodes, links: [], suffixes: suffixes });
widget.update();
$('text.id', widget.el).each(function(i) {
assert.ok($(this).text() === nodes[i].id,
'Checking node label "' + $(this).text() + '" is FQDN');
});
nodes = nodes.filter(function(node) { return /\.common$/.test(node.id) });
inject_data(widget, { nodes: nodes, links: [], suffixes: suffixes });
widget.update();
$('text.id', widget.el).each(function(i) {
assert.ok($(this).text().indexOf('common') < 0,
'Checking node label "' + $(this).text() + '" is relative');
});
});
QUnit.test('Testing TopoGraph with one node', function(assert) {
var node = { id: 'master.ipa.test' };
inject_data(widget, { nodes: [node], links: [], suffixes: [] });
widget.update();
assert.ok($('text.id:eq(0)', widget.el).text() === node.id,
'Checking node label is FQDN');
});
};});