Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
truenas-rk3588
truenas
Commits
d0963efd
Commit
d0963efd
authored
5 years ago
by
ericbsd
Browse files
Options
Download
Email Patches
Plain Diff
added test to wait on dataset permision job with tftp testing
parent
501361bf
freenas/11.3-u3-stable
freenas/11.3-stable
TN-11.3-U5
TN-11.3-U4.1
TN-11.3-U3.2
TN-11.3-U2.2
TN-11.3-U2.1
TN-11.3-U2
TN-11.3-RC2
TN-11.3-RC1
TN-11.3-BETA1
TN-11.3-ALPHA2
FN-11.3.U4
FN-11.3-U5
FN-11.3-U4.1
FN-11.3-U3.2
FN-11.3-U3.1
FN-11.3-U3
FN-11.3-U2.1
FN-11.3-U2
FN-11.3-U1
FN-11.3-RELEASE
FN-11.3-RC2
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/api2/tftp.py
+12
-5
tests/api2/tftp.py
with
12 additions
and
5 deletions
+12
-5
tests/api2/tftp.py
View file @
d0963efd
...
...
@@ -27,6 +27,7 @@ def test_01_Creating_dataset_tftproot():
def
test_02_Setting_permissions_for_TFTP_on_mnt_pool_name_tftproot
():
global
job_id
payload
=
{
'acl'
:
[],
'mode'
:
'777'
,
...
...
@@ -36,9 +37,15 @@ def test_02_Setting_permissions_for_TFTP_on_mnt_pool_name_tftproot():
results
=
POST
(
f
'/pool/dataset/id/
{
dataset_url
}
/permission/'
,
payload
)
assert
results
.
status_code
==
200
,
results
.
text
job_id
=
results
.
json
()
def
test_03_Configuring_TFTP_service
():
def
test_03_verify_the_job_id_is_successfull
():
job_status
=
wait_on_job
(
job_id
,
180
)
assert
job_status
[
'state'
]
==
'SUCCESS'
,
str
(
job_status
[
'results'
])
def
test_04_Configuring_TFTP_service
():
payload
=
{
"directory"
:
f
"/mnt/
{
pool_name
}
/tftproot"
,
"username"
:
"nobody"
,
...
...
@@ -49,13 +56,13 @@ def test_03_Configuring_TFTP_service():
assert
isinstance
(
results
.
json
(),
dict
),
results
.
text
def
test_0
4
_Enable_TFTP_service
():
def
test_0
5
_Enable_TFTP_service
():
results
=
PUT
(
"/service/id/tftp/"
,
{
"enable"
:
True
})
assert
results
.
status_code
==
200
,
results
.
text
def
test_0
5
_Start_TFTP_service
():
def
test_0
6
_Start_TFTP_service
():
results
=
POST
(
'/service/start/'
,
{
'service'
:
'tftp'
,
...
...
@@ -69,12 +76,12 @@ def test_05_Start_TFTP_service():
sleep
(
1
)
def
test_0
6
_Checking_to_see_if_TFTP_service_is_enabled
():
def
test_0
7
_Checking_to_see_if_TFTP_service_is_enabled
():
results
=
GET
(
"/service/?service=tftp"
)
assert
results
.
json
()[
0
][
"state"
]
==
"RUNNING"
,
results
.
text
def
test_0
7
_delete_tftp_dataset
():
def
test_0
8
_delete_tftp_dataset
():
results
=
DELETE
(
f
"/pool/dataset/id/
{
dataset_url
}
/"
)
assert
results
.
status_code
==
200
,
results
.
text
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help