Unit Tests
Fluent Bit comes with some unit test programs that uses the library mode to ingest data and test the output. The tests are based on Google Test suite and requires a C++ compiler.
Requirements
In order to build and run the tests, your system needs a C++ compiler and an installed version of gtest. On Debian/Ubuntu systems the following commands will install the dependencies:
$ sudo apt-get install g++ libgtest-dev
Note that libgtest-dev will only install the sources of the test suite, you need to take some extra steps to make this work:
$ cd /usr/src/gtest
$ sudo cmake .
$ sudo make
$ sudo cp libg* /usr/lib/
Enable Tests
By default Fluent Bit have the tests disabled, you need to append the ENABLE_TESTS option to your cmake line, e.g:
$ cd build/
$ cmake -DFLB_TESTS=ON ../
Running Tests
To run the tests just issue the following command:
$ make test
当前内容版权归 fluentbit.io 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 fluentbit.io .