skip to Main Content

Is it possible to run driver tests locally instead of waiting for a pull request to be triggered? The Apache Age project has four drivers – GoLand, JDBC, Node.js, and Python. I would like to know how to run the tests for each driver individually.

Currently, when a pull request is made, all driver tests are run and checked. However, I am interested in finding out if there is a way to run these tests on my local system.

The project’s regression tests can be run using the installcheck command, but I’m not sure if there are similar commands for the driver tests. Can someone provide instructions on how to run tests for each driver?

2

Answers


  1. You can run them locally for sure, but the local run does not make any effect on the on-cloud (github) test, so that, your test will be just for you and the github checks are supposed to be running on the cloud to ensure the code is working properly on a neutral ground.
    That to avoid the hassle of "Hey it is working on my side, while it is not working on another side".

    Conclusion: You must wait until it get confirmed from a maintainer to run the checks on GitHub actions, and your local run cannot be replaced with github actions.

    Login or Signup to reply.
  2. Adding to @Mohamed Mokhtar’s answer, you can use a virtual environment to get a neutral ground for unit tests for the python driver. This will help avoid conflicts with other packages and will give you an isolated environment to test the driver.

    1. To run the drivers locally, you will first need to get the source files from [Apache Age Github][1]. You can type the following in your terminal to clone the repo.
    git clone https://github.com/apache/age
    
    1. Next, create a virtual environment and activate it.
    python3 -m venv venv
    source venv/bin/activate
    
    1. Install the required dependencies for the drivers as instructed in the readme.md files of the drivers. In case of the python driver, you can simply run the following:
    pip install -r requirements.txt
    
    1. Run your postgres server and execute the file containing test cases.

    NOTE:
    Above instructions are python driver specific but you can follow above to test other drivers as well.
    [1]: https://github.com/apache/age

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search