Initial commit: mod_reqin_log Apache module
Features: - JSON logging of HTTP requests to Unix domain socket - Configurable HTTP headers logging (flat JSON structure) - Header value truncation and count limits - Automatic reconnect on socket disconnection - Error reporting with throttling Configuration directives: - JsonSockLogEnabled: Enable/disable logging - JsonSockLogSocket: Unix socket path - JsonSockLogHeaders: List of headers to log - JsonSockLogMaxHeaders: Maximum headers to log - JsonSockLogMaxHeaderValueLen: Max header value length - JsonSockLogReconnectInterval: Reconnect delay - JsonSockLogErrorReportInterval: Error log throttle Includes: - Module source code (src/) - Unit and integration tests (tests/, scripts/) - Documentation (README.md, architecture.yml) - Build configuration (CMakeLists.txt, Makefile) - Packaging (deb/rpm) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
46
Dockerfile.tests
Normal file
46
Dockerfile.tests
Normal file
@ -0,0 +1,46 @@
|
||||
# Dockerfile for running unit tests
|
||||
FROM rockylinux:8
|
||||
|
||||
# Install build and test dependencies
|
||||
RUN dnf install -y epel-release && \
|
||||
dnf install -y \
|
||||
gcc \
|
||||
make \
|
||||
httpd \
|
||||
httpd-devel \
|
||||
apr-devel \
|
||||
apr-util-devel \
|
||||
cmake \
|
||||
python3 \
|
||||
curl \
|
||||
git \
|
||||
&& dnf clean all
|
||||
|
||||
# Build and install cmocka from source
|
||||
RUN cd /tmp && \
|
||||
git clone https://git.cryptomilk.org/projects/cmocka.git && \
|
||||
cd cmocka && \
|
||||
git checkout cmocka-1.1.5 && \
|
||||
mkdir build && cd build && \
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr && \
|
||||
make && \
|
||||
make install && \
|
||||
cd / && \
|
||||
rm -rf /tmp/cmocka && \
|
||||
dnf remove -y git && \
|
||||
dnf clean all
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY src/ src/
|
||||
COPY tests/ tests/
|
||||
COPY CMakeLists.txt CMakeLists.txt
|
||||
COPY Makefile Makefile
|
||||
|
||||
# Build and run tests
|
||||
RUN mkdir -p build/tests && \
|
||||
cd build/tests && \
|
||||
cmake ../../ && \
|
||||
make
|
||||
|
||||
CMD ["ctest", "--output-on-failure"]
|
||||
Reference in New Issue
Block a user