ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stoa...@apache.org
Subject [1/2] ambari git commit: AMBARI-19426. Modify quick link resource provider to consider filters and return visibility. (Balazs Bence Sari via stoader)
Date Wed, 11 Jan 2017 20:13:27 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 6483710a2 -> 2643dd653


http://git-wip-us.apache.org/repos/asf/ambari/blob/2643dd65/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java
index 6f5dd07..57badb8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java
@@ -37,7 +37,7 @@ public class QuickLinksProfileParserTest {
     assertEquals(
         Filter.linkAttributeFilter("sso", true),
         profile.getFilters().get(0));
-    assertEquals(2, profile.getServices().size());
+    assertEquals(3, profile.getServices().size());
 
     Service hdfs = profile.getServices().get(0);
     assertEquals("HDFS", hdfs.getName());
@@ -58,6 +58,12 @@ public class QuickLinksProfileParserTest {
     assertEquals(
         Filter.acceptAllFilter(true),
         historyServer.getFilters().get(0));
+
+    Service yarn = profile.getServices().get(2);
+    assertEquals(1, yarn.getFilters().size());
+    assertEquals(
+        Filter.linkNameFilter("resourcemanager_ui", true),
+        yarn.getFilters().get(0));
   }
 
   @Test(expected = JsonParseException.class)

http://git-wip-us.apache.org/repos/asf/ambari/blob/2643dd65/ambari-server/src/test/resources/example_quicklinks_profile.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/example_quicklinks_profile.json b/ambari-server/src/test/resources/example_quicklinks_profile.json
index 2fa33a4..50ea5e8 100644
--- a/ambari-server/src/test/resources/example_quicklinks_profile.json
+++ b/ambari-server/src/test/resources/example_quicklinks_profile.json
@@ -43,6 +43,15 @@
           ]
         }
       ]
+    },
+    {
+      "name": "YARN",
+      "filters": [
+        {
+          "link_name": "resourcemanager_ui",
+          "visible": true
+        }
+      ]
     }
   ]
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/2643dd65/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json b/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json
new file mode 100644
index 0000000..457e01d
--- /dev/null
+++ b/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json
@@ -0,0 +1,13 @@
+{
+  "filters": [
+    {
+      "property_name": "sso",
+      "visible": true
+    },
+    {
+      "property_name": "sso",
+      "visible": false
+    }
+  ],
+  "services": []
+}
\ No newline at end of file


Mime
View raw message