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: fixes after upstream changes #1102

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/upgradeability-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: "Get latest released version"
id: get-version
run: |
RELEASED_VERSION=$(helm search repo tractusx/tractusx-connector -o json | jq -r '.[0].version')
RELEASED_VERSION=$(helm search repo tractusx/tractusx-connector -l -o json | jq -r 'map(select(.version !="0.6.0")) | first | .version')
wolf4ood marked this conversation as resolved.
Show resolved Hide resolved
echo "Last official release is $RELEASED_VERSION"
echo "RELEASE=$RELEASED_VERSION" >> $GITHUB_ENV
exit 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.eclipse.edc.jsonld.spi.JsonLd;
import org.eclipse.edc.jsonld.util.JacksonJsonLd;
import org.eclipse.edc.junit.assertions.AbstractResultAssert;
import org.eclipse.edc.spi.agent.ParticipantIdMapper;
import org.eclipse.edc.transform.spi.TypeTransformerRegistry;
import org.eclipse.tractusx.edc.api.edr.dto.NegotiateEdrRequestDto;
import org.eclipse.tractusx.edc.api.edr.transform.JsonObjectToNegotiateEdrRequestDtoTransformer;
Expand All @@ -49,6 +50,9 @@
import static org.eclipse.tractusx.edc.edr.spi.types.EndpointDataReferenceEntry.EDR_ENTRY_PROVIDER_ID;
import static org.eclipse.tractusx.edc.edr.spi.types.EndpointDataReferenceEntry.EDR_ENTRY_STATE;
import static org.eclipse.tractusx.edc.edr.spi.types.EndpointDataReferenceEntry.EDR_ENTRY_TRANSFER_PROCESS_ID;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

public class EdrApiTest {

Expand All @@ -64,7 +68,11 @@ void setUp() {
transformer.register(new JsonObjectToContractOfferDescriptionTransformer());
transformer.register(new JsonObjectToCallbackAddressTransformer());
transformer.register(new JsonObjectToNegotiateEdrRequestDtoTransformer());
OdrlTransformersFactory.jsonObjectToOdrlTransformers().forEach(transformer::register);
var mapper = mock(ParticipantIdMapper.class);

when(mapper.fromIri(any())).thenAnswer(a -> a.getArgument(0));
when(mapper.toIri(any())).thenAnswer(a -> a.getArgument(0));
OdrlTransformersFactory.jsonObjectToOdrlTransformers(mapper).forEach(transformer::register);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public VerifiableCredentialResource issueCredential(IatpParticipant participant,
var rawVc = createLdpVc(jsonLd, type, subjectSupplier);
return VerifiableCredentialResource.Builder.newInstance()
.issuerId(didUrl())
.participantId(participant.didUrl())
.holderId(participant.getBpn())
.credential(new VerifiableCredentialContainer(rawVc, CredentialFormat.JSON_LD, credential))
.build();
Expand Down
Loading