소스 검색

[oozie] Updating Oozie tests with credentials

Romain Rigaux 10 년 전
부모
커밋
d7e4aaf
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      desktop/core/src/desktop/tests.py
  2. 2 1
      desktop/libs/liboozie/src/liboozie/credentials.py

+ 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 = {}