diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bbc49c1..38ea6e4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,7 @@ cmake -DSKIP_DEMOS=true . ## Contributing to the Documentation The documentation is structured in the MkDocs format and uses Material for MkDocs. -To develop the site in this repository, start it in the [Dev Containers](.devcontainer/README.md) +To develop the site in this repository, start it in a [Dev Container](.devcontainer/README.md) and use the following commands: ```shell @@ -57,4 +57,4 @@ mkdocs build - `tc_` is used as a prefix for all exported Testcontainers functions - When possible, we try to avoid special Golang types in public API and try to expose wrapper types - `const` is important for users, and please add it to your arguments when possible. - There is no Const in Golang, so some `typedef` injection is needed when importing CGo + There is no `const` in Golang, so some `typedef` injection is needed when importing CGo diff --git a/README.md b/README.md index 9f8a53e..44d4af3 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,8 @@ [![Stability: Experimental](https://masterminds.github.io/stability/experimental.svg)](https://masterminds.github.io/stability/experimental.html) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/oleg-nenashev/testcontainers-c)](https://github.com/oleg-nenashev/testcontainers-c/releases) -!!! warning - This is a prototype. - There is a lot to do before it can be distributed and used in production, see the GitHub Issues - and the [project roadmap](./ROADMAP.md) +> [!WARNING] +> This is a prototype. There is a lot to do before it can be distributed and used in production, see the GitHub Issues and the [project roadmap](./ROADMAP.md) This is not a standalone [Testcontainers](https://testcontainers.org/) engine, but a C-style shared library adapter for native languages like C/C++, D, Lua, Swift, etc. @@ -88,9 +86,7 @@ describes how it can be done in principle. ## Credits Using a complex Golang framework from C/C++ is not trivial. -Neither the CMake files are. -This project would not succeed without many quality articles -and help from the community. +Neither are the CMake files. This project would not succeed without many quality articles and help from the community. Kudos to: @@ -102,7 +98,7 @@ Kudos to: [An Adventure into CGO - Calling Go code with C](https://medium.com/@ben.mcclelland/an-adventure-into-cgo-calling-go-code-with-c-b20aa6637e75) - [Insu Jang](https://github.com/insujang) for [Implementing Kubernetes C++ Client Library using Go Client Library](https://insujang.github.io/2019-11-28/implementing-kubernetes-cpp-client-library) -- Infinite number of StackOverflow contributors +- An infinite number of StackOverflow contributors ## Discuss diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md index 1cfbfac..7263e77 100644 --- a/docs/SUPPORT.md +++ b/docs/SUPPORT.md @@ -13,17 +13,13 @@ At the moment, this is single channel for all project matters. ## Raising Issues and Feature Requests -Use [GitHub Issues](https://github.com/testcontainers/testcontainers-c/issues). +Use [GitHub Issues](https://github.com/testcontainers/testcontainers-native/issues). Note that it may take some time to get a response, thanks for your patience. Contributions are always welcome, see the [Contributor Guide](../CONTRIBUTING.md). ## Reporting Security Issues -You can submit any security issue or suspected vulnerability -on [GitHub Security](https://github.com/testcontainers/testcontainers-c/security/advisories). -Please do NOT use public GitHub Issues for reporting vulnerabilities. - -Read More - [Security Policy](./SECURITY.md). +See the [Security Policy](./SECURITY.md). ## Commercial Support and Customization diff --git a/docs/architecture/README.md b/docs/architecture/README.md index 73fa218..1476f99 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -1,8 +1,7 @@ # Architecture -!!! note - This section is coming soon. - All contributions are welcome, just submit a pull request! +> [!NOTE] +> This section is coming soon. All contributions are welcome, just submit a pull request! ## Build Process diff --git a/docs/c/README.md b/docs/c/README.md index ef5ccf2..dd5da70 100644 --- a/docs/c/README.md +++ b/docs/c/README.md @@ -3,9 +3,8 @@ You can use the `testcontainers-c` library with common C unit testing frameworks and, soon, with package managers. -!!! note - This section is coming soon. - All contributions are welcome, just submit a pull request! +> [!NOTE] +> This section is coming soon. All contributions are welcome, just submit a pull request! ## Installing the library @@ -39,9 +38,8 @@ CPMAddPackage( ## Using the Library -!!! note - More frameworks will be documented soon. - All contributions are welcome, just submit a pull request! +> [!NOTE] +> More frameworks will be documented soon. All contributions are welcome, just submit a pull request! ### CMake Tests (CTest) diff --git a/docs/cpp/README.md b/docs/cpp/README.md index c0913ed..43ffe30 100644 --- a/docs/cpp/README.md +++ b/docs/cpp/README.md @@ -2,7 +2,7 @@ At the moment, there is no dedicated C++ binding library/header, but it is on [our roadmap](../../ROADMAP.md). -Tou can use the `testcontainers-c` library directly +You can use the `testcontainers-c` library directly in all C++ testing frameworks. ## Google Test @@ -29,10 +29,10 @@ protected: tc_with_exposed_tcp_port(requestId, 8080); tc_with_wait_for_http(requestId, 8080, WIREMOCK_ADMIN_MAPPING_ENDPOINT); tc_with_file(requestId, "test_data/hello.json", "/home/wiremock/mappings/hello.json"); - + struct tc_run_container_return ret = tc_run_container(requestId); containerId = ret.r0; - + EXPECT_TRUE(ret.r1) << "Failed to run the container: " << ret.r2; }; @@ -51,10 +51,10 @@ Then, you can define new tests by referring to the container via `containerId`. TEST_F(WireMockTestContainer, HelloWorld) { std::cout << "Sending HTTP request to the container\n"; struct tc_send_http_get_return response = tc_send_http_get(containerId, 8080, "/hello"); - + ASSERT_NE(response.r0, -1) << "Failed to send HTTP request: " << response.r2; ASSERT_EQ(response.r0, 200) << "Received wrong response code: " << response.r1 << response.r2; - + std::cout << "Server Response: HTTP-" << response.r0 << '\n' << response.r1 << '\n'; } ``` diff --git a/docs/getting-started.md b/docs/getting-started.md index ded08ff..654c245 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,13 +1,12 @@ # Getting Started with Testcontainers for C/C++ -In this section, we will build a demo C application that uses Testcontainers -in a simple C application -for deploying a [WireMock](https://wiremock.org/) API server, -sends a simple HTTP request to this service, +In this section, we will build a simple demo C application that uses Testcontainers +for deploying a [WireMock](https://wiremock.org/) API server. +It sends a simple HTTP request to this service, and verifies the response. -We will not be using any C/C++ test framework for that. +We will not be using any test framework for that. -For test framework framework examples, see the [demos](../demo/README.md). +For test framework examples, see the [demos](../demo/README.md). ## Build the Project