current build passing all tests for channel creation/deletion
This commit is contained in:
parent
34a04f7887
commit
40ade4ebcc
@ -11,14 +11,14 @@ list_all_channels() { # TEST
|
||||
}
|
||||
|
||||
create_channel() {
|
||||
kv='{"secret":"secret", "name":"a test channel", "kind":2, "description":"some bs description"}'
|
||||
kv='{"secret":"secret", "name":"sample", "kind":2, "description":"some bs description"}'
|
||||
result=$($crl $POST $url/channels/create -d "$kv")
|
||||
code=$(echo "$result" | grep HTTP\/1.1 | awk '{print $2}')
|
||||
log_result good_create_channel 200 $code "$result"
|
||||
}
|
||||
|
||||
delete_channel() {
|
||||
kv='{"secret":"secret", "name":"sample channel"}'
|
||||
kv='{"secret":"secret", "name":"sample"}'
|
||||
result=$($crl $POST $url/channels/delete -d "$kv")
|
||||
code=$(echo "$result" | grep HTTP\/1.1 | awk '{print $2}')
|
||||
log_result good_delete_channel 200 $code "$result"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
active_tests='list_channels_no_key list_channels_bad_key delete_channel_missing_param'
|
||||
active_tests='list_channels_no_key list_channels_bad_key delete_channel_missing_param delete_channel_no_channel'
|
||||
|
||||
list_channels_no_key() {
|
||||
result=$($crl $GET $url/channels/list)
|
||||
@ -20,6 +20,15 @@ delete_channel_missing_param() {
|
||||
code=$(echo "$result" | grep HTTP\/1.1 | awk '{print $2}')
|
||||
log_result delete_channel_missing_param 400 $code "$result"
|
||||
}
|
||||
|
||||
delete_channel_no_channel() {
|
||||
# Should 200 as the api just drops the result
|
||||
kv='{"secret":"secret", "name":"yes"}'
|
||||
result=$($crl $POST $url/channels/delete -d "$kv")
|
||||
code=$(echo "$result" | grep HTTP\/1.1 | awk '{print $2}')
|
||||
log_result delete_channel_no_channel_found 200 $code "$result"
|
||||
}
|
||||
|
||||
# Dispatcher to run our tests
|
||||
if [ -z $1 ];then
|
||||
for cmd in $active_tests;do
|
||||
|
Loading…
Reference in New Issue
Block a user