Skip to content

Commit

Permalink
Fix broken NFS test
Browse files Browse the repository at this point in the history
Replace usage of pool.dataset.permission with filesystem.setperm.
  • Loading branch information
anodos325 committed Aug 10, 2024
1 parent d8506b9 commit 74a1774
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions tests/api2/test_300_nfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,21 +318,12 @@ def test_02_creating_dataset_nfs():

@pytest.mark.dependency(depends=['NFS_DATASET_CREATED'])
def test_03_changing_dataset_permissions_of_nfs_dataset():
payload = {
"acl": [],
"mode": "777",
"user": "root",
"group": 'root'
}
results = POST(f"/pool/dataset/id/{dataset_url}/permission/", payload)
assert results.status_code == 200, results.text
global job_id
job_id = results.json()


def test_04_verify_the_job_id_is_successfull():
job_status = wait_on_job(job_id, 180)
assert job_status['state'] == 'SUCCESS', str(job_status['results'])
call('filesystem.setperm', {
'path': os.path.join('/mnt', dataset),
'mode': '777',
'uid': 0,
'gid': 0,
}, job=True)


@pytest.mark.dependency(name='NFSID_SHARE_CREATED', depends=['NFS_DATASET_CREATED'])
Expand Down

0 comments on commit 74a1774

Please sign in to comment.