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

tests/integration: update some tests for updated error-messages #3165

Merged
merged 1 commit into from
Aug 14, 2023

Commits on Aug 14, 2023

  1. tests/integration: update some tests for updated error-messages

    I was in the process of cleaning up some error-messages, and it looks like
    the docker-py tests were depending on strings that will be removed;
    
        =================================== FAILURES ===================================
        _____________ CreateContainerTest.test_create_with_restart_policy ______________
        tests/integration/api_container_test.py:126: in test_create_with_restart_policy
            assert 'You cannot remove ' in err
        E   AssertionError: assert 'You cannot remove ' in 'cannot remove container d11580f6078108691096ec8a23404a6bda9ad1d1b2bafe88b17d127a67728833: container is restarting: stop the container before removing or force remove'
        ____________________ ErrorsTest.test_api_error_parses_json _____________________
        tests/integration/errors_test.py:13: in test_api_error_parses_json
            assert 'You cannot remove a running container' in explanation
        E   AssertionError: assert 'You cannot remove a running container' in 'cannot remove container 4b90ce2e907dd0f99d0f561619b803e7a2a31809ced366c537874dd13f8a47ec: container is running: stop the container before removing or force remove'
    
    This updates the tests to match on a string that will be present in both the
    old and new error-messages, but added a "lower()", so that matching will be
    done case-insensitive (Go errors generally should be lowercase).
    
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    thaJeztah committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    5064995 View commit details
    Browse the repository at this point in the history