guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26173: [PATCH 4/4] tests: ssh: Add a test for SFTP.


From: Clément Lassieur
Subject: bug#26173: [PATCH 4/4] tests: ssh: Add a test for SFTP.
Date: Tue, 21 Mar 2017 01:03:04 +0100
User-agent: mu4e 0.9.18; emacs 25.2.1

Ludovic Courtès <address@hidden> writes:

> Clément Lassieur <address@hidden> skribis:
>
>> * gnu/tests/ssh.scm (run-ssh-test): Introduce "SFTP file writing and 
>> reading".
>> Make 'sftp' a keyword parameter.
>
> Woohoo!
>
> Please also mention the change to ‘%test-openssh’.
>
>> +(define* (run-ssh-test name ssh-service pid-file #:key (sftp #f))
>>    "Run a test of an OS running SSH-SERVICE, which writes its PID to 
>> PID-FILE.
>>  SSH-SERVICE must be configured to listen on port 22 and to allow for root 
>> and
>>  empty-password logins."
>
> Nitpick: call it ‘sftp?’ (with a question mark) to make it clear it’s a
> Boolean, and mention it in the docstring.
>
>> +            ;; Connect to the guest over SFTP.  Make sure we can write and
>> +            ;; read a file there.
>> +            (when #$sftp
>> +              (test-equal "SFTP file writing and reading"
>
> You can write it like this:
>
>   (unless #$sftp?
>     (test-skip 1))
>
>   (test-equal …)
>
> That way the test will be marked as skipped when SFTP support is
> missing, which is marginally nicer.
>
> Thanks for taking the time to write this test!

Thank you for the review :)

I'll send an updated patchset.

Clément





reply via email to

[Prev in Thread] Current Thread [Next in Thread]