On 13/02/14 15:42, Flavio Castelli wrote:
I just realized I forgot to push this small patch upstream.
Here we go again, I forgot another patch :)
Flavio
From 64c7ed901c1faeb2167251d1e7ca8fe1c9e2c90a Mon Sep 17 00:00:00 2001
From: Flavio Castelli fcaste...@suse.com
Date: Wed, 15 Jan 2014 11
I've been procrastinating this mail for quite some time, but the recent
discussion about the quality of patches moved this task on the top of my
TODO list.
The purpose of this mail is to illustrate the recent changes made to our
testing infrastructure. I'll give you a little background
On 20/01/14 10:16, Michael Mraka wrote:
Great job. Thank you for fixing the tests.
I've reviewed and committed them to master.
That's great news. Did you have a chance to look at the few tests which
are still broken? As I said in my previous mail I'm running out of ideas...
Cheers
Flavio
This is a simple patch which adds /var/log/tasko/sat to the tarball created by
spacewalk-debug.
Cheers
Flavio
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel
Add extra log folder /var/log/rhn/tasko/sat/ in spacewalk-debug.
---
backend/satellite_tools/spacewalk-debug | 6 ++
1 file changed, 6 insertions(+)
diff --git a/backend/satellite_tools/spacewalk-debug
b/backend/satellite_tools/spacewalk-debug
index 31b952f..83c8b40 100755
---
These commits bring back to life 39 python tests which have been left
unmaintained for quite a long time.
While fixing and improving the tests I also took the chance to move some of them
to better locations. I tried to be consistent with what has been done in other
parts of the code base.
All
Changed the test to use the db connection params written inside of
db_settings.ini.
---
backend/server/test/unit-test/rhnSQL/test_lob.py | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/backend/server/test/unit-test/rhnSQL/test_lob.py
The `_munge_arg` method of `Procedure` was broken because:
* it referenced the old `self.proc` variable which is long gone.
* it always converted all the arguments to the 1st sqltype (which
happened to be `sql_types.NUMERIC`).
This commit fixes the `test_new_org_1` test inside of
The function which mapped store procedures and functions return types to
rhnSQL's own types didn't process all the known types. In fact it exited
immediately if the first comparison didn't pass.
---
backend/server/rhnSQL/driver_cx_Oracle.py | 6 --
1 file changed, 4 insertions(+), 2
All these files are empty except for `setpath.py` which is not being
used.
---
backend/test/unit/spacewalk/__init__.py| 0
backend/test/unit/spacewalk/test/__init__.py | 0
.../test/unit/spacewalk/test/server/__init__.py| 0
backend/test/unit/spacewalk/test/setpath.py
Ensure the audit log table is cleared.
---
backend/server/test/unit-test/rhnSQL/test_misc_functions.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/backend/server/test/unit-test/rhnSQL/test_misc_functions.py
b/backend/server/test/unit-test/rhnSQL/test_misc_functions.py
index
Fixed the 'create_new_user' helper function: removed calls to no longer
available variables, added support for encrypted passwords and fixed
password validation when encrypted passwords are not toggled.
---
backend/server/test/unit-test/rhnSQL/misc_functions.py | 18 --
1 file
---
backend/server/test/cx_create_table.py | 68
backend/server/test/test_capabilities.py | 94 ++
backend/server/test/unit-test/cx_create_table.py | 68
backend/server/test/unit-test/test_capabilities.py | 94
Ensured the global database instance initialized by rhnSQL is not
reused when there's a database connection error.
The bug emerged while running the whole test suite: all the tests
executed after `test_exceptions` failed because they weren't able to
connect to the database.
---
The previous code was no longer working.
---
.../server/test/unit-test/rhnSQL/misc_functions.py | 76 +++---
1 file changed, 67 insertions(+), 9 deletions(-)
diff --git a/backend/server/test/unit-test/rhnSQL/misc_functions.py
Updated the `test_server_registration` to load the db connection settings from
a configuration file.
---
backend/server/test/unit-test/rhnSQL/test_server_registration.py | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git
Changed the test checking the return value of a sql function to
use a function which does not require testing data to be added to the
db.
---
backend/server/test/unit-test/rhnSQL/test_1.py | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
Call the db connection helper using the right parameters.
---
.../server/test/unit-test/rhnSQL/test_exceptions.py | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/backend/server/test/unit-test/rhnSQL/test_exceptions.py
Fixed more tests by using the right signature when calling the store
procedure chosen by the tests.
---
backend/server/test/unit-test/rhnSQL/test_1.py | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/backend/server/test/unit-test/rhnSQL/test_1.py
Ensured the table used by the test is available, plus dropped it on
exit.
Changed the test to use prepared statements rather than straight
'execute'. The latter does not return any information about the number
of items added/removed from the table. Moreover the code used on production
which does
Made possible to run test_rhnServerGroup without any error.
---
.../test/unit-test/rhnSQL/test_rhnServerGroup.py | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/backend/server/test/unit-test/rhnSQL/test_rhnServerGroup.py
All the test are passing now.
---
.../test/unit-test/rhnSQL/test_rhnChannel.py | 30 +++---
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/backend/server/test/unit-test/rhnSQL/test_rhnChannel.py
b/backend/server/test/unit-test/rhnSQL/test_rhnChannel.py
index
The python code didn't invoke the stored procedure with the right
arguments.
---
backend/server/test/attic/rhnServerGroup.py | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/backend/server/test/attic/rhnServerGroup.py
b/backend/server/test/attic/rhnServerGroup.py
Changed the test to expect the right type of exception.
---
backend/server/test/unit-test/rhnSQL/test_1.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/server/test/unit-test/rhnSQL/test_1.py
b/backend/server/test/unit-test/rhnSQL/test_1.py
index 6a7c076..be121e1
Started to fix some of the broken tests defined inside of
`test_server_registration`.
---
.../server/test/unit-test/rhnSQL/misc_functions.py | 174 +++--
.../unit-test/rhnSQL/test_server_registration.py | 117 +-
2 files changed, 235 insertions(+), 56 deletions(-)
Updated the inline documentation of the `convert_named_query_params` to
reflect the changes made to its API.
Updated the rhnsql-tests to the new API.
---
backend/server/rhnSQL/driver_postgresql.py | 6 +
.../server/test/unit-test/rhnSQL/rhnsql-tests.py | 31 +-
* Read db connection settings from the db_settings.ini file.
* Ensure audit loggin feature won't cause failures.
---
backend/server/test/unit-test/rhnSQL/test_1.py | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/backend/server/test/unit-test/rhnSQL/test_1.py
On 17/12/13 10:17, Flavio Castelli wrote:
Fixed an error raised during the client registration via proxy when
'X-RHN-IP-Path' header is not set. This regression has been introduced
by commit 251005196b02b.
I found another issue later in the same part of the code.
If you want I can merge
Castelli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany
From 30cd21a0d00a4c7fae72bbf1f2aebe530117359a Mon Sep 17 00:00:00 2001
From: Flavio Castelli fcaste...@suse.com
Date: Tue, 12 Nov 2013 11:40:39 +0100
Subject: [PATCH] python server: better logging of exceptions
Ensured all
Added another missin option to spacewalk-repo-sync's man page. Now all
the cli options are mentioned inside of the man page.
---
backend/satellite_tools/spacewalk-repo-sync.sgml | 11 +++
1 file changed, 11 insertions(+)
diff --git a/backend/satellite_tools/spacewalk-repo-sync.sgml
Added the previously undocumented -Y, --deep-verify option to
spacewalk-repo-sync's man page. This fixes bnc#846351.
---
backend/satellite_tools/spacewalk-repo-sync.sgml | 11 +++
1 file changed, 11 insertions(+)
diff --git a/backend/satellite_tools/spacewalk-repo-sync.sgml
these features are missing
from upstream. Unfortunately it does not make sense to upstream them
because they are too SUSE specific.
Cheers
Flavio
--
Flavio Castelli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany
___
Spacewalk-devel mailing
These patches are pretty similar to the ones I sent some weeks ago covering the
PostgreSQL tests.
All the Oracle tests are running fine either by invoking the
`runtests-oracle.py`
directly or by using nosetests.
___
Spacewalk-devel mailing list
Fixed the import statements. This makes possible to run the test suite.
---
backend/test/runtests-oracle.py | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/backend/test/runtests-oracle.py b/backend/test/runtests-oracle.py
index cb5f97a..c13f70f 100755
---
Moved all the Oracle connection settings to the db_settings.ini file
(like we already do with the PostgreSQL's values).
---
backend/test/db_settings.ini| 4
backend/test/runtests-oracle.py | 10 +++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git
Made easier to run python oracle tests using nosetest.
---
backend/test/non-unit/server/rhnSQL/dbtests.py | 38 --
backend/test/runtests-oracle.py| 37 +++--
2 files changed, 34 insertions(+), 41 deletions(-)
diff --git
Ensure the PostgreSQL driver raises a `sql_base.SQLError` when a cursor executes
a query which has unbound variables.
This makes the behaviour of the PostgreSQL driver consistent with the
Oracle one.
---
backend/server/rhnSQL/driver_postgresql.py | 4
Made easier to run the pgsql tests using nosetests in conjunction with
the 'with-xunit'.
Invoking:
nosetests --with-xunit --xunit-file pgsql_tests.xml runtests-postgresql.py
will produce an xml file which can be parsed by Jenkins.
Invoking the script in the old way still works as expected.
Moved PostgreSQL connection settings into a dedicated configuration file. This
makes easier to use different connection parameters since it's no longer
needed to change the python source code.
---
backend/test/db_settings.ini| 5 +
backend/test/runtests-postgresql.py | 12
Handled psycopg2.ProgramminError exceptions inside of the python pgsql
driver. Raise them as sql_base.SQLStatementPrepareError.
This is commit fixes the 'test_statement_prepare_error' test.
---
backend/server/rhnSQL/driver_postgresql.py | 2 ++
1 file changed, 2 insertions(+)
diff --git
The script which starts the python PostgreSQL tests was broken because it
didn't find some required resources, plus it looked for files/directories which
are no longer available.
---
backend/test/runtests-postgresql.py | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git
into the tests interacting with Oracle, that's my next step.
Thanks in advance
Flavio Castelli
--
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman
The `UserDictCase` class is a dictionary with case insensitive keys.
Since it's inherited from `UserDict` it can be passed to method/functions
expecting a classic python dictionary.
Unfortunately `UserDictCase` behaved in a different way when the specified key
was not found: rather than raising a
Wrapped the 'test_statement_prepare_error' test inside of a transaction,
that leaves the database in a clean state after the
`rhnSQL.SQLStatementPrepareError` exception is raised.
---
backend/test/non-unit/server/rhnSQL/dbtests.py | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff
The following patch fixes the execution of the gettext_test.
Cheers
Flavio
--
Flavio Castelli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany
From 98924fbd477e5071c5bfc3ea609df517f0099fe3 Mon Sep 17 00:00:00 2001
From: Flavio Castelli fcaste...@suse.com
Date: Tue, 23 Jul 2013 16
45 matches
Mail list logo