tests/gpg: skip test in JS if GPG is not supported
Skip the single JS test which throws an error if GPG support is disabled in a build time. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
This commit is contained in:
parent
36e4667973
commit
5fc2ddff30
|
|
@ -94,16 +94,22 @@ print("ok add-in-remotes-config-dir");
|
||||||
|
|
||||||
// Trying to set a remote config option via write_config() for a remote
|
// Trying to set a remote config option via write_config() for a remote
|
||||||
// defined in the config file should succeed
|
// defined in the config file should succeed
|
||||||
let [, gpg_verify] = repo.remote_get_gpg_verify('bar');
|
try {
|
||||||
assertEquals(gpg_verify, true);
|
let [, gpg_verify] = repo.remote_get_gpg_verify('bar');
|
||||||
repoConfig = repo.copy_config();
|
assertEquals(gpg_verify, true);
|
||||||
repoConfig.set_boolean('remote "bar"', 'gpg-verify', false);
|
repoConfig = repo.copy_config();
|
||||||
repo.write_config(repoConfig);
|
repoConfig.set_boolean('remote "bar"', 'gpg-verify', false);
|
||||||
repo.reload_config(null);
|
repo.write_config(repoConfig);
|
||||||
[, gpg_verify] = repo.remote_get_gpg_verify('bar');
|
repo.reload_config(null);
|
||||||
assertEquals(gpg_verify, false);
|
[, gpg_verify] = repo.remote_get_gpg_verify('bar');
|
||||||
|
assertEquals(gpg_verify, false);
|
||||||
print("ok config-remote-in-config-file-succeeds");
|
print("ok config-remote-in-config-file-succeeds");
|
||||||
|
} catch (e) {
|
||||||
|
// Skip this test if GPG is not supported
|
||||||
|
if (!(e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_SUPPORTED)))
|
||||||
|
throw e;
|
||||||
|
print("ok config-remote-in-config-file-succeeds # SKIP due build without GPG support");
|
||||||
|
}
|
||||||
|
|
||||||
// Trying to set a remote config option via write_config() for a remote
|
// Trying to set a remote config option via write_config() for a remote
|
||||||
// defined in the config dir should fail with G_IO_ERROR_EXISTS
|
// defined in the config dir should fail with G_IO_ERROR_EXISTS
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue