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

Bump mockito to 1.x #2223

Closed
szokeasaurusrex opened this issue Nov 7, 2024 · 0 comments · Fixed by #2254
Closed

Bump mockito to 1.x #2223

szokeasaurusrex opened this issue Nov 7, 2024 · 0 comments · Fixed by #2254
Assignees

Comments

@szokeasaurusrex
Copy link
Member

Mockito 1.x contains features which we need for #2194, but it also breaks the API we use at the moment. Let's bump to the newer Mockito version to take advantage of the new features

@szokeasaurusrex szokeasaurusrex changed the title Bump mockito to 1.1.1 Bump mockito to 1.x Nov 13, 2024
szokeasaurusrex added a commit that referenced this issue Nov 14, 2024
Instead of using this struct to store options for the endpoint, which then manually need to be checked in the `mock_endpoint` method, convert the struct into a builder which constructs the mock with the provided configuration.

This will make `EndpointOptions` more flexible, allowing us to expand it with new features, and this also reduces branching.

Keeping `EndpointOptions` around, rather than simply calling `mockito` methods directly, will make it easier to handle any breaking changes to the `mockito` library, such as the ones that will occur when implementing #2223
szokeasaurusrex added a commit that referenced this issue Nov 14, 2024
Instead of using this struct to store options for the endpoint, which then manually need to be checked in the `mock_endpoint` method, convert the struct into a builder which constructs the mock with the provided configuration.

This will make `EndpointOptions` more flexible, allowing us to expand it with new features, and this also reduces branching.

Keeping `EndpointOptions` around, rather than simply calling `mockito` methods directly, will make it easier to handle any breaking changes to the `mockito` library, such as the ones that will occur when implementing #2223
szokeasaurusrex added a commit that referenced this issue Nov 14, 2024
Add `TestManager` to manage setting up Mocks and Trycmd tests. This will make bumping to new Mockito #2223 easier
szokeasaurusrex added a commit that referenced this issue Nov 15, 2024
Add `TestManager` to manage setting up Mocks and Trycmd tests. This will make bumping to new Mockito #2223 easier
szokeasaurusrex added a commit that referenced this issue Nov 15, 2024
Add `TestManager` to manage setting up Mocks and Trycmd tests. This will make bumping to new Mockito #2223 easier
@szokeasaurusrex szokeasaurusrex self-assigned this Nov 15, 2024
szokeasaurusrex added a commit that referenced this issue Nov 15, 2024
Add `TestManager` to manage setting up Mocks and Trycmd tests. This will make bumping to new Mockito #2223 easier
szokeasaurusrex added a commit that referenced this issue Nov 15, 2024
Add `TestManager` to manage setting up Mocks and Trycmd tests. This will make bumping to new Mockito #2223 easier
szokeasaurusrex added a commit that referenced this issue Nov 15, 2024
Add `TestManager` to manage setting up Mocks and Trycmd tests. This will make bumping to new Mockito #2223 easier
szokeasaurusrex added a commit that referenced this issue Nov 15, 2024
Add `TestManager` to manage setting up Mocks and Trycmd tests. This will make bumping to new Mockito #2223 easier
szokeasaurusrex added a commit that referenced this issue Nov 15, 2024
Add `TestManager` to manage setting up Mocks and Trycmd tests. This will make bumping to new Mockito #2223 easier
szokeasaurusrex added a commit that referenced this issue Nov 15, 2024
Use the `TestManager` in the recently-added `ensure_correct_assemble_call` test. In the future, we would plan to add `assert_cmd` support to `TestManager`, which would make the remaining custom logic in this test redundant, but we will wait until we have a better idea of how this should look like. For now, this change should make #2223 easier to implement
szokeasaurusrex added a commit that referenced this issue Nov 15, 2024
Bumping to the latest version will allow us to take advantage of new features, such as being able to generate the response of a mock dynamically with a function.

Closes #2223
szokeasaurusrex added a commit that referenced this issue Nov 18, 2024
Bumping to the latest version will allow us to take advantage of new features, such as being able to generate the response of a mock dynamically with a function.

Closes #2223
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 a pull request may close this issue.

1 participant