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

chore: initial integration test #171

Merged
merged 4 commits into from
Sep 5, 2024
Merged

Conversation

astromechza
Copy link
Contributor

@astromechza astromechza commented Jun 25, 2024

This PR adds a basic, but high coverage, integration test to the CI pipeline to validate that we can connect, publish, consume, and close cleanly.

The same test setup and prepare functions could be used in more test suites going forward.

Signed-off-by: Ben Meier <ben.meier@humanitec.com>
@astromechza
Copy link
Contributor Author

rebased on main

@wagslane
Copy link
Owner

wagslane commented Sep 1, 2024

This looks really good! Thanks for the contribution. Only nit before merging:

    logger.go:58: gorabbit WARN: failed to connect to amqp server ***localhost:5672/: Exception (501) Reason: "read tcp [::1]:34238->[::1]:5672: read: connection reset by peer"
    integration_test.go:52: failed to connect Exception (501) Reason: "read tcp [::1]:34238->[::1]:5672: read: connection reset by peer"
    integration_test.go:49: attempting connection
    logger.go:58: gorabbit WARN: failed to connect to amqp server ***localhost:5672/: Exception (501) Reason: "read tcp [::1]:34250->[::1]:5672: read: connection reset by peer"
    integration_test.go:52: failed to connect Exception (501) Reason: "read tcp [::1]:34250->[::1]:5672: read: connection reset by peer"
    integration_test.go:49: attempting connection
    logger.go:58: gorabbit WARN: failed to connect to amqp server ***localhost:5672/: Exception (501) Reason: "read tcp [::1]:34260->[::1]:5672: read: connection reset by peer"
    integration_test.go:52: failed to connect Exception (501) Reason: "read tcp [::1]:34260->[::1]:5672: read: connection reset by peer"
    integration_test.go:49: attempting connection
    logger.go:58: gorabbit WARN: failed to connect to amqp server ***localhost:5672/: Exception (501) Reason: "read tcp [::1]:34272->[::1]:5672: read: connection reset by peer"
    integration_test.go:52: failed to connect Exception (501) Reason: "read tcp [::1]:34272->[::1]:5672: read: connection reset by peer"
    integration_test.go:49: attempting connection
    logger.go:58: gorabbit WARN: failed to connect to amqp server ***localhost:5672/: Exception (501) Reason: "read tcp [::1]:34280->[::1]:5672: read: connection reset by peer"
    ```
    
    I don't love having all these error-looking logs in the happy path. Can we have it just print a "waiting" message or something and only print the error if it times out completely?

@astromechza
Copy link
Contributor Author

astromechza commented Sep 5, 2024

@wagslane ok it looks a bit more sensible now

image

(Unfortunately due to a ci issue I had to bump the go version too in this PR)

@wagslane wagslane merged commit cd74be0 into wagslane:main Sep 5, 2024
1 check passed
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