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

Dbtp 1298 postgres docker tests #287

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Conversation

ksugden
Copy link
Contributor

@ksugden ksugden commented Nov 15, 2024

Addresses DBTP-

Please add any relevant context for you pull request here, or delete this if none needed.


Checklist:

Title:

  • Scope included as per conventional commits
  • Ticket reference included (unless it's a quick out of ticket thing)

Description:

  • Link to ticket included (unless it's a quick out of ticket thing)
  • Includes tests (or an explanation for why it doesn't)
  • Includes any applicable changes to the documentation in this code base
  • Includes link(s) to any applicable changes to the documentation in the DBT Platform Documentation (can be to a pull request)

Tasks:

@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2024

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
8 3 5 0
View the top 3 failed tests by shortest run time
postgres/manage-users/tests/test_manage_users.py::TestCreateOrUpdateDbUser::test_executing_create_or_update_db_user_again_does_not_drop_new_user_tables
Stack Traces | 0s run time
No failure message available
postgres/manage-users/tests/test_manage_users.py::TestCreateOrUpdateDbUser::test_create_or_update_db_user_creates_user
Stack Traces | 0.002s run time
No failure message available
postgres/manage-users/tests/test_manage_users.py::TestCreateOrUpdateDbUser::test_new_user_can_connect_select_and_create_a_table
Stack Traces | 0.009s run time
self = <tests.test_manage_users.TestCreateOrUpdateDbUser object at 0x7f410773e710>

    def test_new_user_can_connect_select_and_create_a_table(self):
>       new_user_connection = psycopg2.connect(
            dbname='test_db',
            user='new_user',
            password='new_password',
            host='postgres-unittest',
            port=5432
        )

.../manage-users/tests/test_manage_users.py:20: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

dsn = 'dbname=test_db user=new_user password=new_password host=postgres-unittest port=5432'
connection_factory = None, cursor_factory = None
kwargs = {'dbname': 'test_db', 'host': 'postgres-unittest', 'password': 'new_password', 'port': 5432, ...}
kwasync = {}

    def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs):
        """
        Create a new database connection.
    
        The connection parameters can be specified as a string:
    
            conn = psycopg2.connect("dbname=test user=postgres password=secret")
    
        or using a set of keyword arguments:
    
            conn = psycopg2.connect(database="test", user="postgres", password="secret")
    
        Or as a mix of both. The basic connection parameters are:
    
        - *dbname*: the database name
        - *database*: the database name (only as keyword argument)
        - *user*: user name used to authenticate
        - *password*: password used to authenticate
        - *host*: database host address (defaults to UNIX socket if not provided)
        - *port*: connection port number (defaults to 5432 if not provided)
    
        Using the *connection_factory* parameter a different class or connections
        factory can be specified. It should be a callable object taking a dsn
        argument.
    
        Using the *cursor_factory* parameter, a new default cursor factory will be
        used by cursor().
    
        Using *async*=True an asynchronous connection will be created. *async_* is
        a valid alias (for Python versions where ``async`` is a keyword).
    
        Any other keyword parameter will be passed to the underlying client
        library: the list of supported parameters depends on the library version.
    
        """
        kwasync = {}
        if 'async' in kwargs:
            kwasync['async'] = kwargs.pop('async')
        if 'async_' in kwargs:
            kwasync['async_'] = kwargs.pop('async_')
    
        dsn = _ext.make_dsn(dsn, **kwargs)
>       conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
E       psycopg2.OperationalError: could not translate host name "postgres-unittest" to address: Temporary failure in name resolution

../../../..../pypoetry/virtualenvs/non-package-mode-TIbHNkaA-py3.11/lib/python3.11.../site-packages/psycopg2/__init__.py:122: OperationalError

To view more test analytics, go to the Test Analytics Dashboard
Got feedback? Let us know on Github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants