ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Levas" <rle...@hortonworks.com>
Subject Review Request 31682: security_status test cases sporadically fail due to import of status_params module
Date Tue, 03 Mar 2015 15:27:37 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31682/
-----------------------------------------------------------

Review request for Ambari, Andrew Onischuk, Emil Anca, and Vitalyi Brodetskyi.


Bugs: AMBARI-9895
    https://issues.apache.org/jira/browse/AMBARI-9895


Repository: ambari


Description
-------

security_status test cases sporadically fail due to import of status_params module. For example
`test_security_status` in `stacks/2.0.6/HDFS/test_hdfs_client.py` imports `status_params.py`
which is not in the test directory path. 

Instead of importing  `status_params.py`, use values from `self.config_dict`

Example:

#Before
```
    cached_kinit_executor_mock.called_with(status_params.kinit_path_local,
                                           status_params.hdfs_user,
                                           status_params.hdfs_user_keytab,
                                           status_params.hdfs_user_principal,
                                           status_params.hostname,
                                           status_params.tmp_dir)
```

#After
```
    cached_kinit_executor_mock.called_with(
      '/usr/bin/kinit',
      self.config_dict['configurations']['hadoop-env']['hdfs_user'],
      self.config_dict['configurations']['hadoop-env']['hdfs_user_keytab'],
      self.config_dict['configurations']['hadoop-env']['hdfs_user_principal_name'],
      self.config_dict['hostname'],
      '/tmp'
    )
```


Diffs
-----

  ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_master.py
e87efbf 
  ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py
fc2b677 
  ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py
e57abbc 
  ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/nimbus.py
f59ed7c 
  ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/ui_server.py
20001cb 
  ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/application_timeline_server.py
b41eadf 
  ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/nodemanager.py
1f2300b 
  ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/resourcemanager.py
167d3b8 
  ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py
383a576 
  ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py 0bb1c99 
  ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py 04a272b 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py b3aa1a4 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py 0868d08 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py abaf89a 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py 628c9b6 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_snamenode.py 9b67011 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_zkfc.py c0fb86f 
  ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py c073d00 
  ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py d0cd2c7 
  ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py 31c8d0d 
  ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py 7c6d8c6 
  ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py 0c20e7d 
  ambari-server/src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py 67da537 
  ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py e75be7b 
  ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py 8f1f338 
  ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py aa8bc7f 
  ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py f567d70 
  ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py 41295bc 
  ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py 56b854f 
  ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py a5b8aa2 
  ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py 97259f7 

Diff: https://reviews.apache.org/r/31682/diff/


Testing
-------

#Local test results:

test_security_status (test_hbase_master.TestHBaseMaster) ... ok
test_security_status (test_hbase_regionserver.TestHbaseRegionServer) ... ok
test_security_status (test_datanode.TestDatanode) ... ok
test_security_status (test_hdfs_client.Test) ... ok
test_security_status (test_journalnode.TestJournalnode) ... ok
test_security_status (test_namenode.TestNamenode) ... ok
test_security_status (test_snamenode.TestSNamenode) ... ok
test_security_status (test_zkfc.TestZkfc) ... ok
test_security_status (test_hive_server.TestHiveServer) ... ok
test_security_status (test_webhcat_server.TestWebHCatServer) ... ok
test_security_status (test_oozie_server.TestOozieServer) ... ok
test_security_status (test_historyserver.TestHistoryServer) ... ok
test_security_status (test_nodemanager.TestNodeManager) ... ok
test_security_status (test_resourcemanager.TestResourceManager) ... ok
test_security_status (test_zookeeper_server.TestZookeeperServer) ... ok
test_security_status (test_falcon_client.TestFalconClient) ... ok
test_security_status (test_falcon_server.TestFalconServer) ... ok
test_security_status (test_hive_metastore.TestHiveMetastore) ... ok
test_security_status (test_storm_drpc_server.TestStormDrpcServer) ... ok
test_security_status (test_storm_nimbus.TestStormNimbus) ... ok
test_security_status (test_storm_ui_server.TestStormUiServer) ... ok
test_security_status (test_apptimelineserver.TestAppTimelineServer) ... ok
test_security_status (test_knox_gateway.TestKnoxGateway) ... ok


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 50.632s
[INFO] Finished at: Tue Mar 03 10:22:13 EST 2015
[INFO] Final Memory: 58M/1296M
[INFO] ------------------------------------------------------------------------

#Jenkins test results: PENDING


Thanks,

Robert Levas


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message