Skip to content
Snippets Groups Projects
Select Git revision
  • 934f5cfa77d339672275107195b0e206884c5a38
  • master default protected
  • base-pairs-ladder
  • rednatco-v2
  • rednatco
  • test
  • ntc-tube-uniform-color
  • ntc-tube-missing-atoms
  • restore-vertex-array-per-program
  • watlas2
  • dnatco_new
  • cleanup-old-nodejs
  • webmmb
  • fix_auth_seq_id
  • update_deps
  • ext_dev
  • ntc_balls
  • nci-2
  • plugin
  • bugfix-0.4.5
  • nci
  • v0.5.0-dev.1
  • v0.4.5
  • v0.4.4
  • v0.4.3
  • v0.4.2
  • v0.4.1
  • v0.4.0
  • v0.3.12
  • v0.3.11
  • v0.3.10
  • v0.3.9
  • v0.3.8
  • v0.3.7
  • v0.3.6
  • v0.3.5
  • v0.3.4
  • v0.3.3
  • v0.3.2
  • v0.3.1
  • v0.3.0
41 results

representation.ts

Blame
  • warden_curl_test.sh NaN GiB
    #!/bin/sh
    #
    # Copyright (C) 2011-2013 Cesnet z.s.p.o
    # Use of this source is governed by a 3-clause BSD-style license, see LICENSE file.
    
    keyfile='key.pem'
    certfile='cert.pem'
    cafile='tcs-ca-bundle.pem'
    url="$1"
    client="$2"
    secret="$3"
    
    #    --fail \
    #    --show-error \
    #
    
    echo "Test  404"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/blefub?client=$client&secret=$secret"
    echo
    
    echo "Test  404"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/?client=$client&secret=$secret"
    echo
    
    echo "Test  403 - no secret"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents?client=$client"
    echo
    
    echo "Test  403 - no client, no secret"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents"
    echo
    
    echo "Test  403 - wrong client"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents?client=asdf.blefub"
    echo
    
    echo "Test  403 - wrong client, right secret"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents?client=asdf.blefub&secret=$secret"
    echo
    
    echo "Test  403 - right client, wrong secret"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents?client=$client&secret=ASDFblefub"
    echo
    
    echo "Test - no client, but secret, should be ok"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents?secret=$secret"
    echo
    
    echo "Test  Deserialization"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        --data '{#$%^' \
        "$url/getEvents?client=$client&secret=$secret"
    echo
    
    echo "Test  Called with unknown category"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents?client=$client&secret=$secret&cat=bflm"
    echo
    
    echo "Test  Called with both cat and nocat"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents?client=$client&secret=$secret&cat=Other&nocat=Test"
    echo
    
    echo "Test  Invalid data for getEvents - silently discarded"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        --data '[1]' \
        "$url/getEvents?client=$client&secret=$secret"
    echo
    
    echo "Test  Called with internal args - just in log"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents?client=$client&secret=$secret&self=test"
    echo
    
    echo "Test  Called with superfluous args - just in log"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents?client=$client&secret=$secret&bad=guy"
    echo
    
    echo "Test  getEvents with no args - should be OK"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents?client=$client&secret=$secret"
    echo
    
    echo "Test  getEvents - should be OK"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getEvents?client=$client&secret=$secret&count=3&id=10"
    echo
    
    echo "Test  getDebug"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getDebug?client=$client&secret=$secret"
    echo
    
    echo "Test  getInfo"
    curl \
        --key $keyfile \
        --cert $certfile \
        --cacert $cafile \
        --connect-timeout 3 \
        --request POST \
        "$url/getInfo?client=$client&secret=$secret"
    echo
    
    #curl \
    #    --fail \
    #    --connect-timeout 3 \
    #    --request POST \
    #    $url/getEvents