ソースを参照

Add test for soa_edit command

tags/v0.4.0
Silke 8ヶ月前
コミット
0ee8b6051f
1個のファイルの変更35行の追加0行の削除
  1. +35
    -0
      tests/v1/soa_edit.sh

+ 35
- 0
tests/v1/soa_edit.sh ファイルの表示

@@ -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":""
}'

読み込み中…
キャンセル
保存