Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating babelfisgpg_unit Extension (babelfish-for-postgresql#1586)
Description At present, babelfish encompasses various testing frameworks such as JDBC, Python, .NET, and fuzz tests. Each of these frameworks serves specific purposes and relies on client drivers. However, we lack a framework dedicated to unit testing. This is the motivation behind this to create a unit testing framework for babelfish. In this commit, we add unit testing framework which enable us to test any piece of our codebase. The babelfishpg_unit directory is added as a new extension within the contrib folder present in babelfish_extensions. It contains the necessary files for the unit testing framework. Here's a brief explanation of each file: Makefile: This file specifies the build instructions for the babelfishpg_unit extension. babelfishpg_unit.control: This files contain metadata and control information about the extension. babelfishpg_unit.h: This header file contains any necessary macros, definitions, or utility functions required for the unit tests. babelfishpg_unit—1.0.0.sql: This SQL script defines the necessary functions and setup for running the tests. It acts as the entry point for invoking the unit tests. Once it is invoked, it will trigger the execution of all the tests or specific tests. babelfishpg_unit.c: This file serves as the main entry point for the unit tests. It includes the necessary headers and implements the logic to execute all the defined tests. test_money.c, ...: These are the individual test files which contains the test cases and assertions specific to a particular area of functionality or component being tested. log_files: It is a folder which contains log files created after each test run Issues Resolved I have developed the framework in such a way that we can run multiple tests by passing multiple parameters. With this framework, all test functions associated with multiple specified parameters can be successfully executed. Signed-off-by: Yenni Shashank [email protected]
- Loading branch information