-
Notifications
You must be signed in to change notification settings - Fork 20
#459 Implemented DeploySecureCredentialsCommand #460
Conversation
…tials. Is dependent on marklogic/ml-app-deployer#460
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! Just one change for the test to make it more thorough.
|
||
import java.io.File; | ||
|
||
public class DeploySecureCredentialsTest extends AbstractAppDeployerTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the manager extends AbstractResourceManager
, change this to extend AbstractManageResourceTest
. Remove the test method in here and move the sample creds file to src/test/resources/sample-app/src/main/ml-config/security/secure-credentials. And change it to use rest-reader
as there's no need for a custom role here.
You can then implement the methods required by the parent class like this:
@Override
protected ResourceManager newResourceManager() {
return new SecureCredentialsManager(manageClient);
}
@Override
protected Command newCommand() {
return new DeploySecureCredentialsCommand();
}
@Override
protected String[] getResourceNames() {
return new String[]{"sec-creds1"};
}
The parent class will do a fairly thorough job of ensuring that create and delete both work.
], | ||
"permission": [ | ||
{ | ||
"role-name": "sec-cred-role", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use rest-reader
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - can you squash the 4 commits into a single one, and I'll merge it?
Added simple version of DeploySecureCredentialsCommand for use with current project at customer that needs to migrate to ml-gradle