APISonar


keywhiz.cli.configs.AddActionConfig.json

> keywhiz > cli > configs > AddActionConfig > json
keywhiz APIs cli APIs configs APIs AddActionConfig APIs json APIs

Example 1
AddActionConfig addActionConfig;

  public void addThrowsIfMetadataHasBadKeys() throws Exception {
    addActionConfig.addType = Arrays.asList("secret");
    addActionConfig.name = secret.getDisplayName();
    addActionConfig.json = "{\"ThisIsABadKey\":\"doh\"}";

    addAction.stream = new ByteArrayInputStream(base64Decoder.decode(secret.getSecret()));
    when(keywhizClient.getSanitizedSecretByName(secret.getName()))
        .thenThrow(new NotFoundException()); // Call checks for existence.

    addAction.run();
  }