|
|
@@ -493,12 +493,16 @@ def test_app_permissions():
|
|
|
check_app(401, 'impala')
|
|
|
check_app(401, 'hbase')
|
|
|
check_app(401, 'pig')
|
|
|
+ check_app(401, 'search')
|
|
|
+ check_app(401, 'spark')
|
|
|
check_app(401, 'oozie')
|
|
|
|
|
|
apps = ClusterConfig(user=user).get_apps()
|
|
|
assert_false('hive' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('impala' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('pig' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('solr' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('spark' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('browser' in apps, apps)
|
|
|
assert_false('scheduler' in apps, apps)
|
|
|
assert_false('dashboard' in apps, apps)
|
|
|
@@ -511,12 +515,16 @@ def test_app_permissions():
|
|
|
check_app(401, 'impala')
|
|
|
check_app(401, 'hbase')
|
|
|
check_app(401, 'pig')
|
|
|
+ check_app(401, 'search')
|
|
|
+ check_app(401, 'spark')
|
|
|
check_app(401, 'oozie')
|
|
|
|
|
|
apps = ClusterConfig(user=user).get_apps()
|
|
|
assert_true('hive' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('impala' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('pig' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('solr' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('spark' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('browser' in apps, apps)
|
|
|
assert_false('scheduler' in apps, apps)
|
|
|
assert_false('dashboard' in apps, apps)
|
|
|
@@ -529,6 +537,8 @@ def test_app_permissions():
|
|
|
check_app(401, 'impala')
|
|
|
check_app(200, 'hbase')
|
|
|
check_app(401, 'pig')
|
|
|
+ check_app(401, 'search')
|
|
|
+ check_app(401, 'spark')
|
|
|
check_app(401, 'oozie')
|
|
|
|
|
|
apps = ClusterConfig(user=user).get_apps()
|
|
|
@@ -538,6 +548,8 @@ def test_app_permissions():
|
|
|
if 'hbase' not in desktop.conf.APP_BLACKLIST.get():
|
|
|
assert_true('browser' in apps, apps)
|
|
|
assert_true('hbase' in apps['browser']['interpreter_names'], apps['browser'])
|
|
|
+ assert_false('solr' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('spark' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('scheduler' in apps, apps)
|
|
|
assert_false('dashboard' in apps, apps)
|
|
|
assert_false('scheduler' in apps, apps)
|
|
|
@@ -549,12 +561,16 @@ def test_app_permissions():
|
|
|
check_app(401, 'impala')
|
|
|
check_app(401, 'hbase')
|
|
|
check_app(401, 'pig')
|
|
|
+ check_app(401, 'search')
|
|
|
+ check_app(401, 'spark')
|
|
|
check_app(401, 'oozie')
|
|
|
|
|
|
apps = ClusterConfig(user=user).get_apps()
|
|
|
assert_false('hive' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('impala' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('pig' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('solr' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('spark' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('browser' in apps, apps)
|
|
|
assert_false('scheduler' in apps, apps)
|
|
|
assert_false('dashboard' in apps, apps)
|
|
|
@@ -567,12 +583,16 @@ def test_app_permissions():
|
|
|
check_app(200, 'impala')
|
|
|
check_app(401, 'hbase')
|
|
|
check_app(401, 'pig')
|
|
|
+ check_app(401, 'search')
|
|
|
+ check_app(401, 'spark')
|
|
|
check_app(401, 'oozie')
|
|
|
|
|
|
apps = ClusterConfig(user=user).get_apps()
|
|
|
assert_false('hive' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_true('impala' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('pig' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('solr' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('spark' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_false('browser' in apps, apps)
|
|
|
assert_false('scheduler' in apps, apps)
|
|
|
assert_false('dashboard' in apps, apps)
|
|
|
@@ -585,23 +605,70 @@ def test_app_permissions():
|
|
|
check_app(200, 'impala')
|
|
|
check_app(401, 'hbase')
|
|
|
check_app(401, 'pig')
|
|
|
+ check_app(401, 'search')
|
|
|
+ check_app(401, 'spark')
|
|
|
check_app(200, 'oozie')
|
|
|
|
|
|
apps = ClusterConfig(user=user).get_apps()
|
|
|
assert_true('scheduler' in apps, apps)
|
|
|
assert_false('browser' in apps, apps) # Actually should be true, but logic not implemented
|
|
|
+ assert_false('solr' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('spark' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
|
|
|
grant_access(USERNAME, GROUPNAME, "pig")
|
|
|
check_app(401, 'beeswax')
|
|
|
check_app(200, 'impala')
|
|
|
check_app(401, 'hbase')
|
|
|
check_app(200, 'pig')
|
|
|
+ check_app(401, 'search')
|
|
|
+ check_app(401, 'spark')
|
|
|
check_app(200, 'oozie')
|
|
|
|
|
|
apps = ClusterConfig(user=user).get_apps()
|
|
|
assert_false('hive' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_true('impala' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
assert_true('pig' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('solr' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('spark' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+
|
|
|
+ if 'search' not in desktop.conf.APP_BLACKLIST.get():
|
|
|
+ grant_access(USERNAME, GROUPNAME, "search")
|
|
|
+ check_app(401, 'beeswax')
|
|
|
+ check_app(200, 'impala')
|
|
|
+ check_app(401, 'hbase')
|
|
|
+ check_app(200, 'pig')
|
|
|
+ check_app(200, 'search')
|
|
|
+ check_app(401, 'spark')
|
|
|
+ check_app(200, 'oozie')
|
|
|
+
|
|
|
+ apps = ClusterConfig(user=user).get_apps()
|
|
|
+ assert_false('hive' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_true('impala' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_true('pig' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_true('solr' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_false('spark' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+
|
|
|
+ if 'spark' not in desktop.conf.APP_BLACKLIST.get():
|
|
|
+ grant_access(USERNAME, GROUPNAME, "spark")
|
|
|
+ check_app(401, 'beeswax')
|
|
|
+ check_app(200, 'impala')
|
|
|
+ check_app(401, 'hbase')
|
|
|
+ check_app(200, 'pig')
|
|
|
+ check_app(200, 'search')
|
|
|
+ check_app(200, 'spark')
|
|
|
+ check_app(200, 'oozie')
|
|
|
+
|
|
|
+ apps = ClusterConfig(user=user).get_apps()
|
|
|
+ assert_false('hive' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_true('impala' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_true('pig' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_true('solr' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_true('spark' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_true('pyspark' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_true('r' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_true('jar' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+ assert_true('py' in apps.get('editor', {}).get('interpreter_names', []), apps)
|
|
|
+
|
|
|
finally:
|
|
|
for f in resets:
|
|
|
f()
|