summaryrefslogtreecommitdiff
path: root/cloudinit/tests
diff options
context:
space:
mode:
authorTill Riedel <riedel@teco.edu>2020-11-17 20:54:14 +0100
committerGitHub <noreply@github.com>2020-11-17 14:54:14 -0500
commita925b5a0ca4aa3e63b084c0f6664fe815c2c9db0 (patch)
treeb77aebe7b49e703c6d8724b679cb1cb28a2d7b12 /cloudinit/tests
parenteeef783b0322d99840f39a58de052772afefe822 (diff)
downloadvyos-cloud-init-a925b5a0ca4aa3e63b084c0f6664fe815c2c9db0.tar.gz
vyos-cloud-init-a925b5a0ca4aa3e63b084c0f6664fe815c2c9db0.zip
add --no-tty option to gpg (#669)
Make sure that gpg works even if the instance has no /dev/tty. This has been observed on Debian. LP: #1813396
Diffstat (limited to 'cloudinit/tests')
-rw-r--r--cloudinit/tests/test_gpg.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/tests/test_gpg.py b/cloudinit/tests/test_gpg.py
index f96f5372..311dfad6 100644
--- a/cloudinit/tests/test_gpg.py
+++ b/cloudinit/tests/test_gpg.py
@@ -49,6 +49,7 @@ class TestReceiveKeys(CiTestCase):
m_subp.return_value = ('', '')
gpg.recv_key(key, keyserver, retries=retries)
m_subp.assert_called_once_with(
- ['gpg', '--keyserver=%s' % keyserver, '--recv-keys', key],
+ ['gpg', '--no-tty',
+ '--keyserver=%s' % keyserver, '--recv-keys', key],
capture=True)
m_sleep.assert_not_called()