Przeglądaj źródła

[oozie] Updating Oozie tests with credentials

Romain Rigaux 10 lat temu
rodzic
commit
d7e4aaf

+ 1 - 1
desktop/core/src/desktop/tests.py

@@ -127,7 +127,7 @@ def test_home():
   tags = json.loads(response.context['json_tags'])
   assert_equal([], tags['mine'][0]['docs'], tags)
   assert_equal([], tags['trash']['docs'], tags)
-  assert_equal([doc.id], tags['history']['docs'], tags)
+  assert_equal([], tags['history']['docs'], tags) # We currently don't fetch [doc.id]
 
 
 def test_skip_wizard():

+ 2 - 1
desktop/libs/liboozie/src/liboozie/credentials.py

@@ -53,7 +53,8 @@ class Credentials(object):
 
     if hive_properties is None:
       hive_properties = hive_site.get_metastore()
-      hive_properties['hive2.server.principal'] = hive_site.get_hiveserver2_kerberos_principal(conf.HIVE_SERVER_HOST.get())
+      if hive_properties:
+        hive_properties['hive2.server.principal'] = hive_site.get_hiveserver2_kerberos_principal(conf.HIVE_SERVER_HOST.get())
 
     if not hive_properties:
       hive_properties = {}