dirsrvtests/create_test.py | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
New commits:
commit 8a9955215e5a4a626fc861e33ff67f6a30bbadaf
Author: Simon Pichugin <spichugi(a)redhat.com>
Date: Tue Jan 10 11:47:16 2017 +0100
Ticket 49055 - Fix create_test.py issues
Bug description: It is impossible to create a test case with a default
set of instances. Also, a replications set up creation fails.
Fix description: Fix the default set condition to check for default values.
Make one common docstring for replicationa and standalone deployments.
https://fedorahosted.org/389/ticket/49055
Reviewed by: vashirov (Thanks!)
diff --git a/dirsrvtests/create_test.py b/dirsrvtests/create_test.py
index 887580e..4c2876e 100755
--- a/dirsrvtests/create_test.py
+++ b/dirsrvtests/create_test.py
@@ -185,7 +185,8 @@ if len(sys.argv) > 0:
# Extract usable values
ticket = args.ticket
suite = args.suite
- if not args.inst and not args.masters and not args.hubs and not args.consumers:
+ if args.inst == '0' and args.masters == '0' and args.hubs == '0' \
+ and args.consumers == '0':
instances = 1
my_topology = [True, 'topology_st']
else:
@@ -656,20 +657,10 @@ if len(sys.argv) > 0:
# Write the test function
if ticket:
TEST.write('def test_ticket{}({}):\n'.format(ticket, my_topology[1]))
- if repl_deployment:
- TEST.write(' """Write your replication test here.\n\n')
- TEST.write(' To access each DirSrv instance use: ' +
- 'topology.master1, topology.master2,\n' +
- ' ..., topology.hub1, ..., topology.consumer1' +
- ',...\n\n')
- TEST.write(' Also, if you need any testcase initialization,\n')
- TEST.write(' please, write additional fixture for that' +
- '(including finalizer).\n')
- else:
- TEST.write(' """Write your testcase here...\n\n')
- TEST.write(' Also, if you need any testcase initialization,\n')
- TEST.write(' please, write additional fixture for that' +
- '(include finalizer).\n')
+ TEST.write(' """Write your testcase here...\n\n')
+ TEST.write(' Also, if you need any testcase initialization,\n')
+ TEST.write(' please, write additional fixture for that' +
+ '(include finalizer).\n')
TEST.write(' """\n\n')
else:
TEST.write('def test_something({}):\n'.format(my_topology[1]))
ldap/admin/src/scripts/repl-monitor.pl.in | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 436616e7f4dbd81598d98be8c51c0720922d49d0
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Thu May 12 16:10:02 2016 -0400
Ticket 48220 - The "repl-monitor" web page does not display "year" in date.
Bug Description: The year is not displayed in the header when the day
is less than 10. Appears to be an issue with localtime().
Fix Description: Instead of strftime for displaying the date.
https://fedorahosted.org/389/ticket/48220
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit 77e6044ee5e44fa86e44280d46f36d63a30458b0)
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in
index de0efa5..3f0a429 100755
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
@@ -192,6 +192,7 @@ use Mozilla::LDAP::Conn; # LDAP module for Perl
use Mozilla::LDAP::Utils qw(normalizeDN); # LULU, utilities.
use Mozilla::LDAP::API qw(:api :ssl :apiv3 :constant); # Direct access to C API
use Time::Local; # to convert GMT Z strings to localtime
+use POSIX;
#
# Global variables
@@ -228,7 +229,7 @@ my %ld; # ldap connection hash
#
my ($opt_f, $opt_h, $opt_p, $opt_u, $opt_t, $opt_r, $opt_s);
my (@conns, @alias, @color);
-my ($section, $interval, $nowraw, $now, $mm, $dd, $tt, $yy, $wday);
+my ($section, $interval, $now, $mm, $dd, $tt, $yy, $wday);
my ($fn, $rc, $prompt, $last_sidx);
my %passwords = ();
my $passwd = "";
@@ -262,9 +263,7 @@ $prompt = "";
$interval = 300 if ( !$interval || $interval <= 0 );
# Get current date/time
- $nowraw = localtime();
- ($wday, $mm, $dd, $tt, $yy) = split(/ /, $nowraw);
- $now = "$wday $mm $dd $yy $tt";
+ $now = strftime "%a %b %e %Y %H:%M:%S", localtime;
# if no -r (Reenter and skip html header), print html header
if (!$opt_r) {
dirsrvtests/create_test.py | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
New commits:
commit e3618371566cd58338250a9bf7a7d4d1d36c8bb0
Author: Viktor Ashirov <vashirov(a)redhat.com>
Date: Fri Dec 2 12:25:41 2016 +0100
Ticket 49060 - Increase number of masters, hubs and consumers in topology
Bug Description:
Currently only 10 masters, hubs and consumers can be created for
testing using lib389. We should increase that number to at least
60 (number of supported replicas in RHEL7.3).
Fix Description:
Allow create_test.py to create up to 99 instances (standalone, masters,
hubs and consumers).
https://fedorahosted.org/389/ticket/49060
Reviewed by: spichugi (Thanks!)
diff --git a/dirsrvtests/create_test.py b/dirsrvtests/create_test.py
index 0eb3b01..423d9d2 100755
--- a/dirsrvtests/create_test.py
+++ b/dirsrvtests/create_test.py
@@ -29,14 +29,14 @@ def displayUsage():
'[ -m|--masters <number of masters> -h|--hubs <number of hubs> ' +
'-c|--consumers <number of consumers> ] -o|--outputfile ]\n')
print ('If only "-t" is provided then a single standalone instance is ' +
- 'created. Or you can create a test suite script using ' +
- '"-s|--suite" instead of using "-t|--ticket". The "-i" option ' +
- 'can add mulitple standalone instances(maximum 10). However, you' +
- ' can not mix "-i" with the replication options(-m, -h , -c). ' +
- 'There is a maximum of 10 masters, 10 hubs, and 10 consumers.')
+ 'created. Or you can create a test suite script using ' +
+ '"-s|--suite" instead of using "-t|--ticket". The "-i" option ' +
+ 'can add mulitple standalone instances (maximum 99). However, you' +
+ ' can not mix "-i" with the replication options (-m, -h , -c). ' +
+ 'There is a maximum of 99 masters, 99 hubs, and 99 consumers.')
print('If "-s|--suite" option was chosen, then no topology would be added ' +
'to the test script. You can find predefined fixtures in the lib389/topologies.py ' +
- 'and usem them or write new one if you have special case.')
+ 'and use them or write a new one if you have a special case.')
exit(1)
@@ -118,30 +118,30 @@ if len(sys.argv) > 0:
displayUsage()
if not args.masters.isdigit() or \
- int(args.masters) > 10 or \
+ int(args.masters) > 99 or \
int(args.masters) < 0:
print('Invalid value for "--masters", it must be a number and it can' +
- ' not be greater than 10')
+ ' not be greater than 99')
displayUsage()
- if not args.hubs.isdigit() or int(args.hubs) > 10 or int(args.hubs) < 0:
+ if not args.hubs.isdigit() or int(args.hubs) > 99 or int(args.hubs) < 0:
print('Invalid value for "--hubs", it must be a number and it can ' +
- 'not be greater than 10')
+ 'not be greater than 99')
displayUsage()
if not args.consumers.isdigit() or \
- int(args.consumers) > 10 or \
+ int(args.consumers) > 99 or \
int(args.consumers) < 0:
print('Invalid value for "--consumers", it must be a number and it ' +
- 'can not be greater than 10')
+ 'can not be greater than 99')
displayUsage()
if args.inst:
if not args.inst.isdigit() or \
- int(args.inst) > 10 or \
+ int(args.inst) > 99 or \
int(args.inst) < 1:
print('Invalid value for "--instances", it must be a number ' +
- 'greater than 0 and not greater than 10')
+ 'greater than 0 and not greater than 99')
displayUsage()
if int(args.inst) > 0:
if int(args.masters) > 0 or \