You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2015/01/06 23:02:38 UTC

[3/7] storm git commit: Updated some of the tests.

Updated some of the tests.


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/618e4851
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/618e4851
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/618e4851

Branch: refs/heads/master
Commit: 618e485110350ca1f6943e717632ab5eb20430e6
Parents: 68f4bcc
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Thu Nov 20 09:49:55 2014 -0600
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Thu Nov 20 09:49:55 2014 -0600

----------------------------------------------------------------------
 storm-core/test/clj/backtype/storm/logviewer_test.clj  | 7 ++++---
 storm-core/test/clj/backtype/storm/supervisor_test.clj | 4 +++-
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/618e4851/storm-core/test/clj/backtype/storm/logviewer_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/backtype/storm/logviewer_test.clj b/storm-core/test/clj/backtype/storm/logviewer_test.clj
index 0600903..23fa0b9 100644
--- a/storm-core/test/clj/backtype/storm/logviewer_test.clj
+++ b/storm-core/test/clj/backtype/storm/logviewer_test.clj
@@ -171,10 +171,11 @@
         (verify-first-call-args-for logviewer/get-log-user-group-whitelist "non-blank-fname")
         (verify-first-call-args-for logviewer/user-groups "alice"))))
 
-  (testing "ignore any cluster-set topology.users"
-    (let [conf {TOPOLOGY-USERS ["alice"]}]
+  (testing "ignore any cluster-set topology.users topology.groups"
+    (let [conf {TOPOLOGY-USERS ["alice"]
+                TOPOLOGY-GROUPS ["alice-group"]}]
       (stubbing [logviewer/get-log-user-group-whitelist [[] []]
-                 logviewer/user-groups []]
+                 logviewer/user-groups ["alice-group"]]
         (is (not (logviewer/authorized-log-user? "alice" "non-blank-fname" conf)))
         (verify-first-call-args-for logviewer/get-log-user-group-whitelist "non-blank-fname")
         (verify-first-call-args-for logviewer/user-groups "alice"))))

http://git-wip-us.apache.org/repos/asf/storm/blob/618e4851/storm-core/test/clj/backtype/storm/supervisor_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/backtype/storm/supervisor_test.clj b/storm-core/test/clj/backtype/storm/supervisor_test.clj
index 0785475..b730cb3 100644
--- a/storm-core/test/clj/backtype/storm/supervisor_test.clj
+++ b/storm-core/test/clj/backtype/storm/supervisor_test.clj
@@ -494,9 +494,11 @@
           exp-storm-id "0123456789"
           exp-port 4242
           exp-logs-users ["bob" "charlie" "daryl"]
-          exp-logs-groups []
+          exp-logs-groups ["read-only-group" "special-group"]
           storm-conf {TOPOLOGY-SUBMITTER-USER "alice"
                       TOPOLOGY-USERS ["charlie" "bob"]
+                      TOPOLOGY-GROUPS ["special-group"]
+                      LOGS-GROUPS ["read-only-group"]
                       LOGS-USERS ["daryl"]}
           exp-data {TOPOLOGY-SUBMITTER-USER exp-owner
                     "worker-id" exp-worker-id