See attached patch.

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany


>From d49e62923f34a64e5c2caac619d751d9e6010ac4 Mon Sep 17 00:00:00 2001
From: Silvio Moioli <smoi...@suse.de>
Date: Mon, 9 Sep 2013 10:56:06 +0200
Subject: [PATCH 05/22] MethodsSetupActionTest: do not assume that methods
 exist

---
 .../action/monitoring/notification/test/MethodsSetupActionTest.java  | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/MethodsSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/MethodsSetupActionTest.java
index bb06c9e..92bfc22 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/MethodsSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/MethodsSetupActionTest.java
@@ -15,6 +15,7 @@
 package com.redhat.rhn.frontend.action.monitoring.notification.test;
 
 import com.redhat.rhn.common.db.datasource.DataResult;
+import com.redhat.rhn.domain.monitoring.notification.test.MethodTest;
 import com.redhat.rhn.frontend.action.monitoring.notification.MethodsSetupAction;
 import com.redhat.rhn.frontend.dto.monitoring.MethodDto;
 import com.redhat.rhn.frontend.struts.RequestContext;
@@ -37,6 +38,10 @@ public class MethodsSetupActionTest extends RhnBaseTestCase {
         sah.getRequest().setupAddParameter("newset", (String)null);
         sah.getRequest().setupAddParameter("returnvisit", (String) null);
         sah.getRequest().setupAddParameter("submitted", "false");
+
+        // ensure a Method exists
+        MethodTest.createTestMethodCommand(sah.getUser());
+
         sah.executeAction();
 
         // Remove if not a List SetupAction
-- 
1.8.1.4



_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to