yanne / api-test

0 stars 0 forks source link

New keywords for listing files, directories or both on the remote host #75

Closed yanne closed 10 years ago

yanne commented 10 years ago

There should be keywords for listing files, directories or both on the remote based on the given path. Currently the following behaviour is needed to achieve this:

${listing} = Execute Command ls /path/to/the/files

The respective keywords are List Directory, List Files In Directory and List Directories In Directory and they should work similarly as the ones in the OperatingSystem test library (including keyword arguments pattern and absolute).

This issue was originally opened at Google Code on Aug 21, 2013.

yanne commented 10 years ago

Original comment by anssi.sy...@eficode.com on Aug 21, 2013.

This was done by https://code.google.com/p/robotframework-sshlibrary/source/detail?r=9f6ec38468406faa1a5196ffa0d7dc129cf68556

yanne commented 10 years ago

Original comment by pekka.klarck on Oct 30, 2013.

Following items found in the review:

1) Decide what to do with symlinks. They should preferably be followed to be consistent with new "File/Directory Should (Not) Exist" keywords. Most importantly, the behavior needs to be documented.

2) "List Directory" should list all items in the directory, not only regular files and directories.

3) Implementation should be cleaned up a little:

yanne commented 10 years ago

Original comment by anssi.sy...@eficode.com on Nov 5, 2013.

This issue was updated by revision d6ed97464ee3 .

List keywords now use objects of type SFTPFileInfo (a new class), instead of handling the file attributes from the Python/Java clients directly.

yanne commented 10 years ago

Original comment by anssi.sy...@eficode.com on Nov 5, 2013.

This issue was updated by revision 80f0ee795ce5 .

Refactored the implementation.

yanne commented 10 years ago

Original comment by anssi.sy...@eficode.com on Nov 5, 2013.

This issue was updated by revision 003af4b0df4b .

Keyword List Directory now returns all the items in the given path, not just files and directories.

Also added a note to the keyword documentation on following the symlinks.

yanne commented 10 years ago

Original comment by tatu.ka...@eficode.com on Nov 5, 2013.

This issue was updated by revision 6a38a6ba5c3a .

Refactored list methods a bit better

yanne commented 10 years ago

Original comment by anssi.sy...@eficode.com on Nov 6, 2013.

This issue was updated by revision df0c48b3a968 .

Added tests for List keywords when the target is a symlinked path.

Also got rid of unnecessary ${target} variable in the List variants' tests.

yanne commented 10 years ago

Original comment by anssi.sy...@eficode.com on Nov 6, 2013.

This issue was updated by revision 66b3afe0dbf9 .

Minor refactoring: Sorted the methods in abstractclient.py and fixed wrapping of long lines.

yanne commented 10 years ago

Original comment by anssi.sy...@eficode.com on Nov 11, 2013.

This issue was updated by revision d6ed97464ee3 .

List keywords now use objects of type SFTPFileInfo (a new class), instead of handling the file attributes from the Python/Java clients directly.

yanne commented 10 years ago

Original comment by anssi.sy...@eficode.com on Nov 11, 2013.

This issue was updated by revision 80f0ee795ce5 .

Refactored the implementation.

yanne commented 10 years ago

Original comment by anssi.sy...@eficode.com on Nov 11, 2013.

This issue was updated by revision 003af4b0df4b .

Keyword List Directory now returns all the items in the given path, not just files and directories.

Also added a note to the keyword documentation on following the symlinks.

yanne commented 10 years ago

Original comment by tatu.ka...@eficode.com on Nov 11, 2013.

This issue was updated by revision af471203d29c .

Refactored list methods a bit better

yanne commented 10 years ago

Original comment by jussi.ao...@gmail.com on Nov 19, 2013.

Reviewed, its good.