use of com.walmartlabs.concord.plugins.hashivault.model.MockContextV2 in project concord-plugins by walmartlabs.
the class HashiVaultTaskV2Test method getTask.
private HashiVaultTask getTask(boolean setDefaults) {
Map<String, Object> vars = new HashMap<>();
if (setDefaults) {
Map<String, Object> defaults = new HashMap<>();
defaults.put("baseUrl", getBaseUrl());
defaults.put("apiToken", getApiToken());
vars.put("hashivaultParams", defaults);
}
Context ctx = new MockContextV2(vars, null);
SecretService s = new MockSecretServiceV2(new MockSecretServiceDelegate() {
@Override
public String exportString(String o, String n, String p) {
return getApiToken();
}
});
return new HashiVaultTask(ctx, s);
}
Aggregations