Re: [Spacewalk-devel] [PATCH] Added Oracle GPG key used to sign Oracle Linux 6 packages.

2013-09-12 Thread Michael Mraka
Avi Miller wrote: % Hi, % % Please ignore this patch. There are other changes required to support the Oracle Linux 6 key, which I'm still researching. Apologies for the noise. % % Thanks, % Avi Hello Avi, as we discussed on IRC - currently spacewalk doesn't correctly recognize signature type

Re: [Spacewalk-devel] [PATCH] There is an issue with the default yum repo label

2013-09-12 Thread Michael Mraka
Avi Miller wrote: % There is an issue with the default yum repo label with some of the new repositories, particularly the Scientific Linux and Oracle Linux Spacewalk Server/Client repos. The full text expands to greater than 64 chars, which is the limit of the database field that stores the

[Spacewalk-devel] [PATCH] junit tests: do not rely on Cobbler

2013-09-12 Thread Silvio Moioli
Hi, We propose some patches to avoid the junit testsuite to depend on Cobbler. With those, we are able to run all the tests using only a database instance seeded with the latest schema version. Details: - patch 17 calls setupTestConfiguration() on KickstartDataTest before calling other members

[Spacewalk-devel] [PATCH] junit tests: some logging cleanups

2013-09-12 Thread Silvio Moioli
Hi, As previously discussed the new logging feature requires calling LoggingFactory.clearLogId() at the beginning of each transaction, and there were some places in test code where that was missing. I confirm that the latest patches from Grant actually covered most cases, I could only find four

[Spacewalk-devel] [PATCH] Frontend monitoring tests: ensure a Monitoring Scout exists

2013-09-12 Thread Silvio Moioli
Hi, In some frontend tests it is assumed that at least one Monitoring Scout exists, and those tests will fail if there is none. The proposed attached patch creates a test Monitoring Scout before any operation that requires one, thus eliminating this precondition. Regards, -- Silvio Moioli SUSE

[Spacewalk-devel] [PATCH] MasterHandlerTest: handle getDefaultMaster exceptions

2013-09-12 Thread Silvio Moioli
Hi, If I understand code correctly MasterHandlerTest is about testing that some methods can or cannot be called by administrators and regular users. IssMaster objects are created ad-hoc for testing, and one of them is flagged and unflagged as default during the tests themselves. The only problem

[Spacewalk-devel] [PATCH] TestUtils: use the same temporary filename for the same file

2013-09-12 Thread Silvio Moioli
Hi, The attached patch fixes a previous contribution of mine to transparently get resources either from the filesystem or from a jar file. When accessing a file from a jar that files gets decompressed in a temporary location which name was generated at random for each call. This however did not

[Spacewalk-devel] [PATCH] SystemHandlerTest: do not rely on hardcoded sequence ids

2013-09-12 Thread Silvio Moioli
SystemHandlerTest was failing in our environment and, AFAIU, it expects that the underlying database will always return 1 as the id of a persisted test object. This is normally not the case, as the value is taken from a sequence and there is no code to ensure it is reset before the test, so I

[Spacewalk-devel] [PATCH] DownloadActionTest: do not assume file to be downloaded exists

2013-09-12 Thread Silvio Moioli
See attached patch. Regards, -- Silvio Moioli SUSE LINUX Products GmbH Maxfeldstraße 5, 90409 Nürnberg Germany From 67eef48cbd7a10d9451501ade7d6df9c01a6f430 Mon Sep 17 00:00:00 2001 From: Silvio Moioli smoi...@suse.de Date: Mon, 9 Sep 2013 08:25:23 +0200 Subject: [PATCH 04/22]

[Spacewalk-devel] [PATCH] AuthFilterTest: mocked request object updated

2013-09-12 Thread Silvio Moioli
AuthFilterTest was failing in our setup, apparently because the mocked request object was missing some methods that were added after the test itself was written. I added those methods and now it passes. See attached patch. Regards, -- Silvio Moioli SUSE LINUX Products GmbH Maxfeldstraße 5,

[Spacewalk-devel] [PATCH] OrgHandlerTest: don't depend on a channel family with free entitlement slots

2013-09-12 Thread Silvio Moioli
OrgHandlerTest apparently required an official Red Hat channel family with free slots: /** * Lookup an official Red Hat channel family with free slots. * Fail the test if none can be found. [...] private ChannelFamily lookupRedHatChannelFamily() { [...] } Actually, this is a precondition not

[Spacewalk-devel] [PATCH] ActivationKeyHandlerTest: expect correct exceptions

2013-09-12 Thread Silvio Moioli
ActivationKeyHandlerTest expected InvalidEntitlementException where actually FaultException gets thrown. I updated the testcase. See attached patch. Regards, -- Silvio Moioli SUSE LINUX Products GmbH Maxfeldstraße 5, 90409 Nürnberg Germany From 72b582c013959eb7efc45c57b05c76e7ff4bb654 Mon Sep

[Spacewalk-devel] [PATCH] RequestContext.buildPageLink: force parameter ordering

2013-09-12 Thread Silvio Moioli
Hi, I noticed that buildPageLink() uses a HashMap to keep track of query string parameters. While this is perfectly okay from a web application point of view, it makes testing a little more difficult and in particular, RequestContextTest could break because it implicitly relies on key ordering.