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

Add an implementation for a MockVersionService #1733

Open
rafaelmag110 opened this issue Jan 8, 2025 · 2 comments
Open

Add an implementation for a MockVersionService #1733

rafaelmag110 opened this issue Jan 8, 2025 · 2 comments
Labels
enhancement New feature or request triage all new issues awaiting classification

Comments

@rafaelmag110
Copy link
Contributor

WHAT

We should provide a mock implementation of the VersionService interface in the mock-connector runtime.

WHY

With the update to edc 0.11.0-20241213-SNAPSHOT, the protocol api was excluded from the mock-connector runtime since no mock provider was implemented for the VersionService. If we want to keep the protocol api available for mocking, we have to provide an implementation for it.

@bmg13
Copy link
Contributor

bmg13 commented Jan 17, 2025

The next is a proposing solution for this issue:

In the mock-connector runtime and a implementation stub (similar to existing ones) for VersionProtocolService that implements both AbstractServiceStub and VersionProtocolService. Something similar to the next.

public class VersionProtocolServiceStub extends AbstractServiceStub implements VersionProtocolService {

    public VersionProtocolServiceStub(ResponseQueue responseQueue) {
        super(responseQueue);
    }

    @Override
    public ServiceResult<ProtocolVersions> getAll(TokenRepresentation tokenRepresentation) {
        return responseQueue.getNext(ProtocolVersions.class, "Error retrieving ProtocolVersions: %s");
    }
}

and in the MockServiceExtension provide the new VersionProtocolServiceStub similar to the ones already provided.

The exclusion of the protocol api can be now removed.

Helpful context on this approach: #1264

@bmg13
Copy link
Contributor

bmg13 commented Jan 17, 2025

Once triaged, could I be assigned this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage all new issues awaiting classification
Projects
Status: Open
Development

No branches or pull requests

2 participants