Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add test cases for arrays and objects, and introduce verify_schema #250

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Dec 19, 2023

  1. chore: Add .idea to .gitignore

    amotl committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    fe92e45 View commit details
    Browse the repository at this point in the history
  2. test: Add test cases for arrays and objects

    In PostgreSQL, all boils down to the `jsonb[]` type, but arrays are
    reflected as `sqlalchemy.dialects.postgresql.ARRAY` instead of
    `sqlalchemy.dialects.postgresql.JSONB`.
    
    In order to prepare for more advanced type mangling & validation, and to
    better support databases pretending to be compatible with PostgreSQL,
    the new test cases exercise arrays with different kinds of inner values,
    because, on other databases, ARRAYs may need to have uniform content.
    
    Along the lines, it adds a `verify_schema` utility function in the
    spirit of the `verify_data` function, refactored and generalized from
    the `test_anyof` test case.
    amotl committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    c0d4a89 View commit details
    Browse the repository at this point in the history
  3. test: Fix FATAL: sorry, too many clients already

    Dispose the SQLAlchemy engine object after use within test utility functions.
    amotl committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    8b3ea4f View commit details
    Browse the repository at this point in the history
  4. test: Fix FATAL: sorry, too many clients already

    Within `BasePostgresSDKTests`, new database connections via SQLAlchemy
    haven't been closed, and started filling up the connection pool,
    eventually saturating it.
    amotl committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    a9d1796 View commit details
    Browse the repository at this point in the history
  5. test: Fix FATAL: sorry, too many clients already

    Dispose the SQLAlchemy engine object after use within
    `PostgresConnector`.
    amotl committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    723e1fa View commit details
    Browse the repository at this point in the history