diff mbox series

[v3,11/11] tests/acceptance/virtiofs_submounts.py: fix setup of SSH pubkey

Message ID 20210412044644.55083-12-crosa@redhat.com
State New
Headers show
Series Acceptance Test: introduce base class for Linux based tests | expand

Commit Message

Cleber Rosa April 12, 2021, 4:46 a.m. UTC
The public key argument should be a path to a file, and not the
public key data.

Reported-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
 tests/acceptance/virtiofs_submounts.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Wainer dos Santos Moschetta April 12, 2021, 3:08 p.m. UTC | #1
On 4/12/21 1:46 AM, Cleber Rosa wrote:
> The public key argument should be a path to a file, and not the
> public key data.
>
> Reported-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
>   tests/acceptance/virtiofs_submounts.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>


>
> diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virtiofs_submounts.py
> index d77ee356740..21ad7d792e7 100644
> --- a/tests/acceptance/virtiofs_submounts.py
> +++ b/tests/acceptance/virtiofs_submounts.py
> @@ -195,7 +195,7 @@ def setUp(self):
>   
>           self.run(('ssh-keygen', '-N', '', '-t', 'ed25519', '-f', self.ssh_key))
>   
> -        pubkey = open(self.ssh_key + '.pub').read()
> +        pubkey = self.ssh_key + '.pub'
>   
>           super(VirtiofsSubmountsTest, self).setUp(pubkey)
>
Willian Rampazzo April 12, 2021, 6:59 p.m. UTC | #2
On Mon, Apr 12, 2021 at 1:48 AM Cleber Rosa <crosa@redhat.com> wrote:
>
> The public key argument should be a path to a file, and not the
> public key data.
>
> Reported-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
>  tests/acceptance/virtiofs_submounts.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Eric Auger April 19, 2021, 3:03 p.m. UTC | #3
Hi Cleber,

On 4/12/21 6:46 AM, Cleber Rosa wrote:
> The public key argument should be a path to a file, and not the
> public key data.
> 
> Reported-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
>  tests/acceptance/virtiofs_submounts.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virtiofs_submounts.py
> index d77ee356740..21ad7d792e7 100644
> --- a/tests/acceptance/virtiofs_submounts.py
> +++ b/tests/acceptance/virtiofs_submounts.py
> @@ -195,7 +195,7 @@ def setUp(self):
>  
>          self.run(('ssh-keygen', '-N', '', '-t', 'ed25519', '-f', self.ssh_key))
>  
> -        pubkey = open(self.ssh_key + '.pub').read()
> +        pubkey = self.ssh_key + '.pub'
>  
>          super(VirtiofsSubmountsTest, self).setUp(pubkey)
>  
> 
Reviewed-by: Eric Auger <eric.auger@redhat.com>

Thanks

Eric
diff mbox series

Patch

diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virtiofs_submounts.py
index d77ee356740..21ad7d792e7 100644
--- a/tests/acceptance/virtiofs_submounts.py
+++ b/tests/acceptance/virtiofs_submounts.py
@@ -195,7 +195,7 @@  def setUp(self):
 
         self.run(('ssh-keygen', '-N', '', '-t', 'ed25519', '-f', self.ssh_key))
 
-        pubkey = open(self.ssh_key + '.pub').read()
+        pubkey = self.ssh_key + '.pub'
 
         super(VirtiofsSubmountsTest, self).setUp(pubkey)