Skip to content

Commit

Permalink
Bug 572366 verify product's public key on hc-fls interaction
Browse files Browse the repository at this point in the history
Redirect test licence data residence to test resources

Signed-off-by: eparovyshnaya <[email protected]>
  • Loading branch information
eparovyshnaya committed Mar 31, 2021
1 parent 80ff999 commit f7b60df
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import static org.junit.Assert.fail;

import org.eclipse.passage.lbc.base.tests.TestData;
import org.eclipse.passage.lbc.internal.base.EagerFloatingState;
import org.eclipse.passage.lbc.internal.base.api.FloatingState;
import org.eclipse.passage.lbc.internal.base.api.RawRequest;
import org.eclipse.passage.lic.internal.api.LicensingException;
Expand All @@ -42,7 +43,7 @@ final class ShortcutClient<T> implements Client<ShortcutConnection, T> {
public ServiceInvocationResult<T> request(Request<ShortcutConnection> request, ResponseHandler<T> handler) {
try {
ShortcutConnection connection = request.config().apply(new ShortcutConnection(request.parameters()));
RawRequest raw = new RawRequestFromConnection(connection, remote.state());
RawRequest raw = new RawRequestFromConnection(connection, state());
NetResponse response = remote.invoke(raw);
assertFalse(response.failed());
connection.installResponse(response);
Expand All @@ -55,6 +56,10 @@ public ServiceInvocationResult<T> request(Request<ShortcutConnection> request, R
}
}

private EagerFloatingState state() {
return new EagerFloatingState(remote.state().grants(), new TestLicFolder().get());
}

static interface Remote {

FloatingState state();
Expand Down

0 comments on commit f7b60df

Please sign in to comment.