Skip to content

Review ingestion integration tests #798

Closed

Description

@pmbrull

Running the local Docker Compose and local_ingestion_dependency.sh does not seem to be enough to get up and running with the Integration Tests.

With the docs approach, we get the following failures:

FAILED tests/integration/hive/test_hive_crud.py::test_check_table - TypeError: __init__() takes 2 positional arguments but 4 were given
FAILED tests/integration/ldap/test_ldap_crud.py::test_read_user - requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://localhost:8585/api/v1/users/name/john_doe
FAILED tests/integration/mysql/test_mysql_crud.py::test_read_schema - sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'localhost' ([Errno 61] Connection refused)")
FAILED tests/unit/helpers_test.py::RestTest::test_5_create_table - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:8585/api/v1/databases?fields=service
FAILED tests/unit/workflow_test.py::WorkflowTest::test_execute_200 - TypeError: not all arguments converted during string formatting

and a bunch of tests not passing.

Ideally, the tests should run correctly out of the box to help us validate new contributions. If needed, we should update the docs as well to ease and incentivize new developments.

Thanks!

Activity

  1. vijaypm commented on Oct 19, 2021

    @vijaypm
    Contributor

    In case anyone else is looking at this issue, I was able to make test_mysql_crud.py work with a few minor changes to the test case. Please see the attached git diff patch file.
    ISSUE-798_mysql.patch.txt
    Please note that for this patch to work, you will need to follow these instructions:

    1. Checkout tag 0.4.0
    2. Update docker/metadata/docker-compose.yml as indicated in the patch file.
    3. Bring up OpenMetadata services with (remember to configure Docker to allocate at least 4GB memory otherwise ElasticSearch will keep crashing)

    docker-compose up

    1. Install python packages

    pip install -r ingestion/requirements.txt
    pip install -e ingestion
    pip install pytest
    pip install pytest-docker

    1. Update ingestion/tests/integration/mysql/test_mysql_crud.py as indicated in the patch file
    2. Run integration test

    cd ingestion/tests/integration/mysql/
    pytest -s -c /dev/null

  2. harshach commented on Oct 21, 2021

    @harshach
    Collaborator

    Thanks, @vijaypm for taking this on. If you run into an issue please ping us on slack
    cc @ayush-shah

  3. vijaypm commented on Oct 23, 2021

    @vijaypm
    Contributor

    There seem to be multiple issues here. So, breaking down the issue into smaller issues to make it more manageable. Broke out the MySQL Integration test issue into its own issue here - #910

  4. vijaypm commented on Oct 27, 2021

    @vijaypm
    Contributor

    Separated the error with Hive integration test into issue #960

  5. vijaypm commented on Oct 31, 2021

    @vijaypm
    Contributor

    MySQL tests were fixed as part of PR #914

  6. vijaypm commented on Oct 31, 2021

    @vijaypm
    Contributor

    Hive tests being fixed as part of PR #988

  7. vijaypm commented on Nov 6, 2021

    @vijaypm
    Contributor

    Ldap test has been fixed as part of PR #1088

  8. vijaypm commented on Nov 7, 2021

    @vijaypm
    Contributor

    Split the issue with failing unittest into issue #1091

  9. vijaypm commented on Nov 8, 2021

    @vijaypm
    Contributor

    @pmbrull I believe this issue can now be closed

  10. pmbrull commented on Nov 8, 2021

    @pmbrull
    MemberAuthor

    Hi, @vijaypm!!

    Amazing work on this, thanks a lot for tackling the tests. It will be much safer now to make evolutions to the code 🙏

    We can close this 🤗 Feel free to open further issues if needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions