Skip to content

Commit

Permalink
Add test for cdp
Browse files Browse the repository at this point in the history
  • Loading branch information
shirleylxie committed Apr 6, 2021
1 parent c4967e8 commit 8e3ee11
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def raise_for_status(self):
yield


@pytest.fixture(params=['cdh', 'hdp'])
@pytest.fixture(params=['cdh', 'cdp', 'hdp'])
def users_groups_for_directories(request, onefs_client):
"""
Get users and groups from the identities module that
Expand All @@ -603,6 +603,7 @@ def _pass(*args, **kwargs):
identities.iterate_identities(
{
'cdh': identities.cdh_identities,
'cdp': identities.cdh_identities,
'hdp': identities.hdp_identities,
}[request.param](onefs_client.zone),
create_group=lambda group_name: groups.add(group_name),
Expand All @@ -614,6 +615,7 @@ def _pass(*args, **kwargs):
(users, groups),
{
'cdh': directories.cdh_directories,
'cdp': directories.cdh_directories,
'hdp': directories.hdp_directories,
}[request.param]()
)
2 changes: 1 addition & 1 deletion tests/test__scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def empty_hdfs_root(onefs_client):

@pytest.mark.usefixtures('empty_hdfs_root')
@pytest.mark.parametrize('script', ['isilon_create_users', 'isilon_create_directories'])
@pytest.mark.parametrize('dist', ['cdh', 'hdp'])
@pytest.mark.parametrize('dist', ['cdh', 'cdp', 'hdp'])
def test_dry_run(script, onefs_client, dist):
subprocess.check_call([
script,
Expand Down
1 change: 1 addition & 0 deletions tests/test_identities.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'identities',
[
isilon_hadoop_tools.identities.cdh_identities,
isilon_hadoop_tools.identities.cdp_identities,
isilon_hadoop_tools.identities.hdp_identities,
],
)
Expand Down

0 comments on commit 8e3ee11

Please sign in to comment.