Skip to content

Commit fc90335

Browse files
authored
chore: move hello apps & contract tests to dedicated folders (#121)
Moves both hello apps into an examples directory. Moves contract tests into a contract-tests directory. Updates the SDK contract tests README with content.
1 parent fa312c3 commit fc90335

36 files changed

+49
-10
lines changed

.github/workflows/client.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
env:
1717
# Port the test service (implemented in this repo) should bind to.
1818
TEST_SERVICE_PORT: 8123
19-
TEST_SERVICE_BINARY: ./build/apps/sdk-contract-tests/sdk-tests
19+
TEST_SERVICE_BINARY: ./build/contract-tests/sdk-contract-tests/sdk-tests
2020
steps:
2121
- uses: actions/checkout@v3
2222
- uses: ./.github/actions/ci
@@ -29,7 +29,7 @@ jobs:
2929
with:
3030
# Inform the test harness of test service's port.
3131
test_service_port: ${{ env.TEST_SERVICE_PORT }}
32-
extra_params: '-skip-from ./apps/sdk-contract-tests/test-suppressions.txt'
32+
extra_params: '-skip-from ./contract-tests/sdk-contract-tests/test-suppressions.txt'
3333
build-test:
3434
runs-on: ubuntu-22.04
3535
steps:

.github/workflows/sse.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
env:
2424
# Port the test service (implemented in this repo) should bind to.
2525
TEST_SERVICE_PORT: 8123
26-
TEST_SERVICE_BINARY: ./build/apps/sse-contract-tests/sse-tests
26+
TEST_SERVICE_BINARY: ./build/contract-tests/sse-contract-tests/sse-tests
2727
steps:
2828
- uses: actions/checkout@v3
2929
- uses: ./.github/actions/ci

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ message(STATUS "LaunchDarkly: using OpenSSL v${OPENSSL_VERSION}")
5858

5959
set(Boost_USE_STATIC_LIBS ON)
6060

61-
if(BUILD_SHARED_LIBS)
61+
if (BUILD_SHARED_LIBS)
6262
# When building a shared library we hide all symbols
6363
# aside from this we have specifically exported for the C-API.
6464
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
6565
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
66-
endif()
66+
endif ()
6767

6868
set(Boost_USE_MULTITHREADED ON)
6969
set(Boost_USE_STATIC_RUNTIME OFF)
@@ -90,5 +90,5 @@ set(BUILD_TESTING "${ORIGINAL_BUILD_TESTING}")
9090

9191
set(BUILD_SHARED_LIBS "${ORIGINAL_BUILD_SHARED_LIBS}")
9292

93-
94-
add_subdirectory(apps)
93+
add_subdirectory(contract-tests)
94+
add_subdirectory(examples)

apps/sdk-contract-tests/README.md

Whitespace-only changes.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
add_subdirectory(sse-contract-tests)
22
add_subdirectory(sdk-contract-tests)
3-
add_subdirectory(hello-cpp-client)
4-
add_subdirectory(hello-c-client)
File renamed without changes.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## SDK contract tests
2+
3+
Contract tests have a "test service" on one side, and the "test harness" on
4+
the other.
5+
6+
This project implements the test service for the C++ Client-Side SDK.
7+
8+
**session (session.hpp)**
9+
10+
This provides a simple REST API for creating/destroying
11+
test entities. Examples:
12+
13+
`GET /` - returns the capabilities of this service.
14+
15+
`DELETE /` - shutdown the service.
16+
17+
`POST /` - create a new test entity, and return its ID.
18+
19+
`DELETE /entity/1` - delete the an entity identified by `1`.
20+
21+
**entity manager (entity_manager.hpp)**
22+
23+
This manages "entities", which are unique instances of the SDK client.
24+
25+
**definitions (definitions.hpp)**
26+
27+
Contains JSON definitions that are used to communicate with the test harness.
28+
29+
**server (server.hpp)**
30+
31+
Glues everything together, mainly providing the TCP acceptor that spawns new sessions.
32+
33+
**session (session.hpp)**
34+
35+
Prepares HTTP responses based on the results of commands sent to entities.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)