use of com.android.tools.build.bundletool.flags.FlagParser in project bundletool by google.
the class AddTransparencyCommandTest method buildingCommandViaFlags_generateCodeTransparencyFileMode_unrecognizedFlag.
@Test
public void buildingCommandViaFlags_generateCodeTransparencyFileMode_unrecognizedFlag() {
Throwable e = assertThrows(UnknownFlagsException.class, () -> AddTransparencyCommand.fromFlags(new FlagParser().parse("--mode=generate_code_transparency_file", "--bundle=" + bundlePath, "--output=" + outputUnsignedTransparencyFilePath, "--transparency-key-certificate=" + transparencyKeyCertificatePath, "--ks=" + keystorePath)));
assertThat(e).hasMessageThat().contains("Unrecognized flags");
}
use of com.android.tools.build.bundletool.flags.FlagParser in project bundletool by google.
the class AddTransparencyCommandTest method buildingCommandViaFlags_defaultMode_transparencyKeyCertificateFlagSet.
@Test
public void buildingCommandViaFlags_defaultMode_transparencyKeyCertificateFlagSet() {
Throwable e = assertThrows(UnknownFlagsException.class, () -> AddTransparencyCommand.fromFlags(new FlagParser().parse("--bundle=" + bundlePath, "--output=" + outputBundlePath, "--ks=" + keystorePath, "--ks-key-alias=" + KEY_ALIAS, "--ks-pass=pass:" + KEYSTORE_PASSWORD, "--key-pass=pass:" + KEY_PASSWORD, "--transparency-key-certificate=" + transparencyKeyCertificatePath)));
assertThat(e).hasMessageThat().contains("Unrecognized flags");
}
use of com.android.tools.build.bundletool.flags.FlagParser in project bundletool by google.
the class AddTransparencyCommandTest method buildingCommandViaFlags_defaultMode_keyAliasNotSet.
@Test
public void buildingCommandViaFlags_defaultMode_keyAliasNotSet() {
Throwable e = assertThrows(RequiredFlagNotSetException.class, () -> AddTransparencyCommand.fromFlags(new FlagParser().parse("--bundle=" + bundlePath, "--output=" + outputBundlePath, "--ks=" + keystorePath, "--ks-pass=pass:" + KEYSTORE_PASSWORD, "--key-pass=pass:" + KEY_PASSWORD)));
assertThat(e).hasMessageThat().contains("Missing the required --ks-key-alias flag");
}
use of com.android.tools.build.bundletool.flags.FlagParser in project bundletool by google.
the class AddTransparencyCommandTest method buildingCommandViaFlags_defaultMode_bundlePathNotSet.
@Test
public void buildingCommandViaFlags_defaultMode_bundlePathNotSet() {
Throwable e = assertThrows(RequiredFlagNotSetException.class, () -> AddTransparencyCommand.fromFlags(new FlagParser().parse("--output=" + outputBundlePath, "--ks=" + keystorePath, "--ks-key-alias=" + KEY_ALIAS, "--ks-pass=pass:" + KEYSTORE_PASSWORD, "--key-pass=pass:" + KEY_PASSWORD)));
assertThat(e).hasMessageThat().contains("Missing the required --bundle flag");
}
use of com.android.tools.build.bundletool.flags.FlagParser in project bundletool by google.
the class AddTransparencyCommandTest method buildingCommandViaFlags_defaultMode_keystoreNotSet.
@Test
public void buildingCommandViaFlags_defaultMode_keystoreNotSet() {
Throwable e = assertThrows(RequiredFlagNotSetException.class, () -> AddTransparencyCommand.fromFlags(new FlagParser().parse("--bundle=" + bundlePath, "--output=" + outputBundlePath, "--ks-key-alias=" + KEY_ALIAS, "--ks-pass=pass:" + KEYSTORE_PASSWORD, "--key-pass=pass:" + KEY_PASSWORD)));
assertThat(e).hasMessageThat().contains("Missing the required --ks flag");
}
Aggregations