summaryrefslogtreecommitdiffstats
path: root/src/gtest
diff options
context:
space:
mode:
authorDan Klein <danklei@cisco.com>2015-10-20 05:39:14 +0300
committerDan Klein <danklei@cisco.com>2015-10-20 05:39:14 +0300
commitcf753587ffb7b89cff1863c74ca334b8c41fd0c0 (patch)
treef9d8bd9e67cb93306e93041f11f5e4124a6e151a /src/gtest
parentd09df99769f67819c64a7a025dbdcd39811c7b44 (diff)
parent51ad078182d17b42a36c239c3c21381eeb3eec85 (diff)
Merge branch 'master' into master-demo +
working demo of loading a YAML, and attaching it to server
Diffstat (limited to 'src/gtest')
-rw-r--r--src/gtest/rpc_test.cpp9
-rwxr-xr-xsrc/gtest/tuple_gen_test.cpp4
2 files changed, 4 insertions, 9 deletions
diff --git a/src/gtest/rpc_test.cpp b/src/gtest/rpc_test.cpp
index 38d34320..250d5342 100644
--- a/src/gtest/rpc_test.cpp
+++ b/src/gtest/rpc_test.cpp
@@ -42,11 +42,6 @@ protected:
m_verbose = false;
- TrexRpcServerConfig cfg = TrexRpcServerConfig(TrexRpcServerConfig::RPC_PROT_TCP, 5050);
-
- m_rpc = new TrexRpcServer(cfg);
- m_rpc->start();
-
m_context = zmq_ctx_new ();
m_socket = zmq_socket (m_context, ZMQ_REQ);
zmq_connect (m_socket, "tcp://localhost:5050");
@@ -54,9 +49,6 @@ protected:
}
virtual void TearDown() {
- m_rpc->stop();
-
- delete m_rpc;
zmq_close(m_socket);
zmq_term(m_context);
}
@@ -657,3 +649,4 @@ TEST_F(RpcTestOwned, start_stop_traffic) {
send_request(request, response);
EXPECT_EQ(response["result"], "ACK");
}
+
diff --git a/src/gtest/tuple_gen_test.cpp b/src/gtest/tuple_gen_test.cpp
index 8791b67d..8a774e38 100755
--- a/src/gtest/tuple_gen_test.cpp
+++ b/src/gtest/tuple_gen_test.cpp
@@ -334,7 +334,8 @@ TEST(tuple_gen,GenerateTupleMac) {
CClientPool gen;
gen.Create(cdSEQ_DIST,
- 0x10000001, 0x1000000f, 64000,2, &fl,true,0,0);
+ 0x10000001, 0x1000000f, 64000,2, &fl.m_mac_info,true,0,0);
+
CTupleBase result;
uint32_t result_src;
uint16_t result_port;
@@ -348,6 +349,7 @@ TEST(tuple_gen,GenerateTupleMac) {
result_mac = result.getClientMac();
EXPECT_EQ(result_src, (uint32_t)(0x10000001+i%2));
EXPECT_EQ(result_port, 1024+i/2);
+ printf("i:%d,mac:%d\n",i,result_mac->mac[3]);
if (i%2==0)
EXPECT_EQ(result_mac->mac[3], 5);
else