Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:

Expand All @@ -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

Expand Down
8 changes: 2 additions & 6 deletions docs/SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions docs/architecture/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
10 changes: 4 additions & 6 deletions docs/c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

Expand Down
10 changes: 5 additions & 5 deletions docs/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
};

Expand All @@ -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';
}
```
Expand Down
11 changes: 5 additions & 6 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down