aws-samples / aws-iot-securetunneling-localproxy

AWS Iot Secure Tunneling local proxy reference C++ implementation
https://docs.aws.amazon.com/iot/latest/developerguide/what-is-secure-tunneling.html
Apache License 2.0
73 stars 70 forks source link

localproxytest fails first time; built with latest Docker for Windows #73

Closed ceich closed 2 years ago

ceich commented 2 years ago

Describe the bug

After building via Docker, localproxytest fails the first time

To Reproduce

Steps to reproduce the behavior:

  1. Install Docker Desktop for Windows
  2. Check out aws-iot-securetunneling-localproxy
  3. Run docker build --build-arg OPENSSL_CONFIG=linux-generic64 -t aws-iot-securetunneling-localproxy:latest .
  4. Run docker run --name localproxy --rm -it aws-iot-securetunneling-localproxy:latest bash
  5. In the Docker shell, run ./localproxytest

Expected behavior

All tests should pass.

Actual behavior

WebProxyAdapter.h-happy-case test failed. I then ran ./localproxytest again, and all tests passed.

Logs

...
Test HTTP server is listening on address: 127.0.0.1 and port: 37033
[2022-03-17 17:57:30.530775] [0x00007f491982f700] [trace]   Establishing TCP connection with the Web Proxy
[2022-03-17 17:57:30.531546] [0x00007f491982f700] [debug]   Connected successfully with Web Proxy
[2022-03-17 17:57:30.531583] [0x00007f491982f700] [trace]   Calling lowest_layer with type: websocket_stream_type
[2022-03-17 17:57:30.531618] [0x00007f491982f700] [trace]   Preparing HTTP CONNECT request
[2022-03-17 17:57:30.531648] [0x00007f491982f700] [trace]   Sending HTTP CONNECT
[2022-03-17 17:57:30.531763] [0x00007f491982f700] [debug]   Successfully sent HTTP CONNECT to the Web proxy
[2022-03-17 17:57:30.531828] [0x00007f491982f700] [trace]   Waiting for HTTP CONNECT response from the Web proxy

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2022-03-17 17:57:30.531891] [0x00007f491982f700] [trace]   Parsing the HTTPS response from the Web proxy
localproxytest is a Catch v2.13.6 host application.
Run with -? for options

[2022-03-17 17:57:30.532008] [0x00007f491982f700] [debug]   Full response from the Web proxy:
HTTP/1.1 200 OK

¶I⌂
-------------------------------------------------------------------------------
Unit tests for WebProxyAdapter.h-happy-case
-------------------------------------------------------------------------------
/home/dependencies/aws-iot-securetunneling-localproxy/test/WebProxyAdapterTests.cpp:88
...............................................................................

/home/dependencies/aws-iot-securetunneling-localproxy/test/WebProxyAdapterTests.cpp:93: FAILED:
  REQUIRE( test_context.ec.message() == WebProxyAdapterErrc_category().message((int) WebProxyAdapterErrc::Success) )
[2022-03-17 17:57:30.532188] [0x00007f491982f700] [info]    TCP tunnel established successfully
with expansion:
  "Success"
  ==
  "TCP Tunnel established successfully"

terminate called without an active exception
/home/dependencies/aws-iot-securetunneling-localproxy/test/WebProxyAdapterTests.cpp:93: FAILED:
  {Unknown expression after the reported line}
due to a fatal error condition:
  SIGABRT - Abort (abnormal termination) signal

===============================================================================
test cases:   8 |   7 passed | 1 failed
assertions: 104 | 102 passed | 2 failed

Aborted

Environment (please complete the following information):

Additional context

Add any other context about the problem here.