This repository was archived by the owner on Nov 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
79ceeed
gitignore update
mieciu 8367755
gitignore update
mieciu 34c428e
debug conf
mieciu b6ba253
yay debug
mieciu 69a028d
works
mieciu 93227e7
remove noise
mieciu 0b11ade
readme
mieciu 3ab77c5
another thing
mieciu c7d8153
another thing
mieciu b1da0e0
cleanup gitignore
mieciu 627d2a0
fix happy path
mieciu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| Quesma Integration Tests | ||
| ======================== | ||
|
|
||
| This directory contains integration tests for Quesma. | ||
| These are simple, end-to-end tests that verify the functionality of Quesma using [Testcontainers library](https://testcontainers.com). | ||
|
|
||
|
|
||
|
|
||
|
|
||
| How to debug | ||
| ============ | ||
|
|
||
| There is a way to run these tests agains a local Quesma instance with debugger attached. | ||
|
|
||
| 1. Set up a breakpoint in Quesma codebase. | ||
| 2. Change the `debugQuesmaDuringTestRun` flag to `true` in `ci/it/testcases/utils.go` | ||
| 3. Start an integration test (either with CLI or in your IDE using play button next to the test declaration). | ||
| ...Test case execution will block and wait until you start Quesma manually in IDE in debug mode) | ||
| 4. Start Quesma in Debug mode using `Debug Quesma ITs` Run Configuration in your IDE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| // Copyright Quesma, licensed under the Elastic License 2.0. | ||
| // SPDX-License-Identifier: Elastic-2.0 | ||
|
|
||
| package testcases | ||
|
|
||
| import ( | ||
| "context" | ||
| "github.com/docker/docker/api/types" | ||
| "github.com/docker/go-connections/nat" | ||
| "github.com/testcontainers/testcontainers-go" | ||
| "github.com/testcontainers/testcontainers-go/exec" | ||
| "io" | ||
| "time" | ||
| ) | ||
|
|
||
| func NewManuallyCreatedContainer() *ManuallyCreatedContainer { | ||
| return &ManuallyCreatedContainer{} | ||
| } | ||
|
|
||
| type ManuallyCreatedContainer struct{} | ||
|
|
||
| func (c ManuallyCreatedContainer) GetContainerID() string { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) Endpoint(ctx context.Context, s string) (string, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) PortEndpoint(ctx context.Context, port nat.Port, s string) (string, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) Host(ctx context.Context) (string, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) Inspect(ctx context.Context) (*types.ContainerJSON, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) MappedPort(ctx context.Context, port nat.Port) (nat.Port, error) { | ||
| return "8080/tcp", nil | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) Ports(ctx context.Context) (nat.PortMap, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) SessionID() string { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) IsRunning() bool { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) Start(ctx context.Context) error { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) Stop(ctx context.Context, duration *time.Duration) error { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) Terminate(ctx context.Context) error { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) Logs(ctx context.Context) (io.ReadCloser, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) FollowOutput(consumer testcontainers.LogConsumer) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) StartLogProducer(ctx context.Context, option ...testcontainers.LogProductionOption) error { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) StopLogProducer() error { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) Name(ctx context.Context) (string, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) State(ctx context.Context) (*types.ContainerState, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) Networks(ctx context.Context) ([]string, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) NetworkAliases(ctx context.Context) (map[string][]string, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) Exec(ctx context.Context, cmd []string, options ...exec.ProcessOption) (int, io.Reader, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) ContainerIP(ctx context.Context) (string, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) ContainerIPs(ctx context.Context) ([]string, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) CopyToContainer(ctx context.Context, fileContent []byte, containerFilePath string, fileMode int64) error { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) CopyDirToContainer(ctx context.Context, hostDirPath string, containerParentPath string, fileMode int64) error { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) CopyFileToContainer(ctx context.Context, hostFilePath string, containerFilePath string, fileMode int64) error { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) CopyFileFromContainer(ctx context.Context, filePath string) (io.ReadCloser, error) { | ||
| panic("implement me") | ||
| } | ||
|
|
||
| func (c ManuallyCreatedContainer) GetLogProductionErrorChannel() <-chan error { | ||
| panic("implement me") | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: used few times, maybe it would be good to extract as const