Browse Source

Add test for soa_edit command

tags/v0.4.0
Silke 7 months ago
parent
commit
0ee8b6051f
1 changed files with 35 additions and 0 deletions
  1. +35
    -0
      tests/v1/soa_edit.sh

+ 35
- 0
tests/v1/soa_edit.sh View File

@@ -0,0 +1,35 @@
#!/bin/bash

_TEST "V1 SOA-EDIT"
_SUBTEST "Retrieve"
_RUN 'soa_edit example.com' \
'GET http://hostname:8000/api/v1/servers/servername/zones/example.com' \
'Current values:' \
'SOA-EDIT:' \
'SOA-EDIT-API:'

_SUBTEST "Set one"
_RUN 'soa_edit example.com INCREMENT-WEEKS' \
'GET http://hostname:8000/api/v1/servers/servername/zones/example.com' \
'Setting:' \
'SOA-EDIT: INCREMENT-WEEKS' \
'SOA-EDIT-API: DEFAULT' \
'PUT http://hostname:8000/api/v1/servers/servername/zones/example.com' \
'{
"soa_edit":"INCREMENT-WEEKS",
"soa_edit_api":"DEFAULT",
"kind":""
}'

_SUBTEST "Set both"
_RUN 'soa_edit example.com INCREMENT-WEEKS SOA-EDIT' \
'GET http://hostname:8000/api/v1/servers/servername/zones/example.com' \
'Setting:' \
'SOA-EDIT: INCREMENT-WEEKS' \
'SOA-EDIT-API: SOA-EDIT' \
'PUT http://hostname:8000/api/v1/servers/servername/zones/example.com' \
'{
"soa_edit":"INCREMENT-WEEKS",
"soa_edit_api":"SOA-EDIT",
"kind":""
}'

Loading…
Cancel
Save