mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-10 05:18:30 +03:00
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
|
||||
// defined in the config file should succeed
|
||||
let [, gpg_verify] = repo.remote_get_gpg_verify('bar');
|
||||
assertEquals(gpg_verify, true);
|
||||
repoConfig = repo.copy_config();
|
||||
repoConfig.set_boolean('remote "bar"', 'gpg-verify', false);
|
||||
repo.write_config(repoConfig);
|
||||
repo.reload_config(null);
|
||||
[, gpg_verify] = repo.remote_get_gpg_verify('bar');
|
||||
assertEquals(gpg_verify, false);
|
||||
|
||||
print("ok config-remote-in-config-file-succeeds");
|
||||
try {
|
||||
let [, gpg_verify] = repo.remote_get_gpg_verify('bar');
|
||||
assertEquals(gpg_verify, true);
|
||||
repoConfig = repo.copy_config();
|
||||
repoConfig.set_boolean('remote "bar"', 'gpg-verify', false);
|
||||
repo.write_config(repoConfig);
|
||||
repo.reload_config(null);
|
||||
[, gpg_verify] = repo.remote_get_gpg_verify('bar');
|
||||
assertEquals(gpg_verify, false);
|
||||
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
|
||||
// defined in the config dir should fail with G_IO_ERROR_EXISTS
|
||||
|
Loading…
Reference in New Issue
Block a user