Skip to content

Commit

Permalink
Added test for data set member
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandofloresg committed May 13, 2024
1 parent c431927 commit eaefd0f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/functional/modules/test_zos_data_set_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,3 +1041,23 @@ def test_create_special_chars(ansible_zos_module):
finally:
hosts.all.zos_data_set(name=data_set_name, state="absent")


def test_create_member_special_chars(ansible_zos_module):
try:
hosts = ansible_zos_module
data_set_name = get_tmp_ds_name(symbols=True)
results = hosts.all.zos_data_set(name=data_set_name, state="present", type="pds")
results = hosts.all.zos_data_set(name=data_set_name+ "(M@M#R)", state="present", type="member")
for result in results.contacted.values():
assert result.get("changed") is True
assert result.get("module_stderr") is None
results = hosts.all.shell(cmd=f"dls ANSIBLE.*")
for result in results.contacted.values():
assert data_set_name in result.get("stdout")
results = hosts.all.zos_data_set(name=data_set_name, state="absent",)
for result in results.contacted.values():
assert result.get("changed") is True
assert result.get("module_stderr") is None
finally:
hosts.all.zos_data_set(name=data_set_name, state="absent")

0 comments on commit eaefd0f

Please sign in to comment.