ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject [3/8] git commit: AMBARI-7860. Download client configs not working, returns 404 (dlysnichenko)
Date Mon, 20 Oct 2014 18:02:01 GMT
AMBARI-7860. Download client configs not working, returns 404 (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/47929dce
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/47929dce
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/47929dce

Branch: refs/heads/trunk
Commit: 47929dce2e854a5ee1ad7944da83d90545c517da
Parents: f9fe992
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Mon Oct 20 20:57:44 2014 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Mon Oct 20 20:57:44 2014 +0300

----------------------------------------------------------------------
 .../controller/internal/ClientConfigResourceProvider.java      | 2 ++
 .../controller/internal/ClientConfigResourceProviderTest.java  | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/47929dce/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
index 312f23f..0adc52d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
@@ -331,6 +331,8 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv
       throw new SystemException("Controller error ", e);
     }
 
+    Resource resource = new ResourceImpl(Resource.Type.ClientConfig);
+    resources.add(resource);
     return resources;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/47929dce/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
index 14f5082..0e27dcf 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
@@ -43,6 +43,7 @@ import java.lang.reflect.Method;
 import java.util.*;
 
 import static org.easymock.EasyMock.*;
+import static org.junit.Assert.assertFalse;
 
 /**
  * TaskResourceProvider tests.
@@ -293,9 +294,8 @@ public class ClientConfigResourceProviderTest {
             runtime, process);
     PowerMock.replayAll();
 
-    provider.getResources(request, predicate);
-
-
+    Set<Resource> resources = provider.getResources(request, predicate);
+    assertFalse(resources.isEmpty());
 
     // verify
     verify(managementController, clusters, cluster, ambariMetaInfo, stackId, componentInfo,commandScriptDefinition,


Mime
View raw message