This func is called by us from mytest_handler to check for TSHttpTxnClientProtocolStackContains
| 3129 | |
| 3130 | // This func is called by us from mytest_handler to check for TSHttpTxnClientProtocolStackContains |
| 3131 | static int |
| 3132 | checkHttpTxnClientProtocolStackContains(SocketTest *test, void *data) |
| 3133 | { |
| 3134 | TSHttpTxn txnp = static_cast<TSHttpTxn>(data); |
| 3135 | const char *ret_tag = TSHttpTxnClientProtocolStackContains(txnp, "tcp"); |
| 3136 | test->test_client_protocol_stack_contains = true; |
| 3137 | if (ret_tag) { |
| 3138 | const char *normalized_tag = TSNormalizedProtocolTag("tcp"); |
| 3139 | if (normalized_tag != ret_tag) { |
| 3140 | SDK_RPRINT(test->regtest, "TSHttpTxnClientProtocolStackContains", "TestCase1", TC_FAIL, |
| 3141 | "contains tcp, but normalized tag is wrong"); |
| 3142 | } else { |
| 3143 | SDK_RPRINT(test->regtest, "TSHttpTxnClientProtocolStackContains", "TestCase1", TC_PASS, "ok tcp"); |
| 3144 | } |
| 3145 | } else { |
| 3146 | SDK_RPRINT(test->regtest, "TSHttpTxnClientProtocolStackContains", "TestCase1", TC_FAIL, "missing tcp"); |
| 3147 | test->test_client_protocol_stack_contains = false; |
| 3148 | } |
| 3149 | ret_tag = TSHttpTxnClientProtocolStackContains(txnp, "udp"); |
| 3150 | if (!ret_tag) { |
| 3151 | SDK_RPRINT(test->regtest, "TSHttpTxnClientProtocolStackContains", "TestCase2", TC_PASS, "ok no udp"); |
| 3152 | } else { |
| 3153 | SDK_RPRINT(test->regtest, "TSHttpTxnClientProtocolStackContains", "TestCase2", TC_FAIL, "faulty udp report"); |
| 3154 | test->test_client_protocol_stack_contains = false; |
| 3155 | } |
| 3156 | return TS_EVENT_CONTINUE; |
| 3157 | } |
| 3158 | |
| 3159 | // This func is called by us from mytest_handler to check for TSHttpTxnNextHopIPGet |
| 3160 | static int |
no test coverage detected