c610b4da257dd2e7540200d49a033aefd91d4113
[anna.git] / example / diameter / launcher / deployments / ft-client / tests / experiment1 / case_1.sh
1 #!/bin/bash
2
3 # In this test we will send a incorrect message (AAR) to the server peer:
4 #       Warning | source/diameter/codec/Message.cpp (387) | Internal Avp decoding error (avp code = 443): Avp format error, the avp length is incorrect (must be multiple of 4 on grouped type)
5 #
6 # The server shall answer with the FailedAVP and we will check this to validate the test.
7
8 #############
9 # VARIABLES #
10 #############
11 # Paths from the point of view of ADML executable:
12 REQ1_HEX=./hex_examples/aar-bad.hex
13
14 #############
15 # FUNCTIONS #
16 #############
17
18
19 #############
20 # EXECUTION #
21 #############
22
23 # Goto working directory
24 cd `dirname $0`
25
26 # Source utils:
27 source common.sh
28
29 # Clean traffic traces:
30 rm -f ../../launcher.log*
31
32 # Send incorrect AAR:
33 send_hex $REQ1_HEX &
34
35 # Monitor activity:
36 monitor_4_message ../../launcher.log.recvfe 10
37
38 # Check if message was received:
39 [ $? -ne 0 ] && test_failed "Missing answer from the server"
40
41 # Check launcher.log.recvfe:
42 check_pattern "<avp name=\"Result-Code\" data=\"5004\" alias=\"DIAMETER_INVALID_AVP_VALUE\"/>" ../../launcher.log.recvfe
43 check_pattern "<avp name=\"Failed-AVP\">( *)<avp name=\"Subscription-Id\"" ../../launcher.log.recvfe
44
45 # Test OK
46 test_ok "Received answer to bad-aar message indicating Failed-AVP as Subscription-Id"
47