zerodha / cppkiteconnect

C++ Kite Connect API library / SDK
Other
47 stars 22 forks source link

cppkiteconnect SDK mock test is getting failed in kiteTest #39

Closed shubsri93 closed 2 years ago

shubsri93 commented 2 years ago

I have successfully build the SDK but it fails in kite-test

Describe the bug Start 2: kite-test

2: Test command: /home/shubsri93/tradeBot/cppkiteconnect-main/build/tests/kiteTest 2: Test timeout computed to be: 1500 2: Running main() from /home/shubsri93/tradeBot/cppkiteconnect-main/deps/deps/googletest-release-1.10.0/googletest/src/gtest_main.cc 2: [==========] Running 40 tests from 1 test suite. 2: [----------] Global test environment set-up. 2: [----------] 40 tests from kiteTest 2: [ RUN ] kiteTest.constructorTest 2: [ OK ] kiteTest.constructorTest (1 ms) 2: [ RUN ] kiteTest.loginURLTest 2: [ OK ] kiteTest.loginURLTest (0 ms) 2: [ RUN ] kiteTest.generateSessionTest 2: [ OK ] kiteTest.generateSessionTest (1 ms) 2: [ RUN ] kiteTest.invalidateSessionTest 2: [ OK ] kiteTest.invalidateSessionTest (0 ms) 2: [ RUN ] kiteTest.profile 2: /home/shubsri93/tradeBot/cppkiteconnect-main/tests/unit/kitetest.cpp:131: Failure 2: Value of: jsonFile 2: Actual: false 2: Expected: true . . 2: [ FAILED ] kiteTest.getSIPsTest 2: [ FAILED ] kiteTest.getSIPTest 2: [ FAILED ] kiteTest.getOrderMarginsTest 2: [ FAILED ] kiteTest.getInstrumentsTest 2: [ FAILED ] kiteTest.getMFInstrumentsTest 2: 2: 35 FAILED TESTS 2/3 Test #2: kite-test ........................***Failed 0.01 sec

. . 67% tests passed, 1 tests failed out of 3

Total Test time (real) = 0.03 sec

The following tests FAILED: 2 - kite-test (Failed) Errors while running CTest

To Reproduce make && make test ARGS='-V'

Machine (please complete the following information):

bhumitattarde commented 2 years ago

@shubsri93 Have you fetched the required Git sub-modules? Issue git submodule update --init --recursive and try again.

shubsri93 commented 2 years ago

mock_response folder was empty. Downloaded SDK once again and moved all files from new mock_response to my version of tests/mock_responses. It is working now

shubsri93 commented 2 years ago

@bhumitattarde thanks for you help, Closing this ticket.