robotframework-unixfilesystem
==========================
**robotframework-unixfilesystem** is a `Robot Framework
<http://code.google.com/p/robotframework/>`_ test library to test
UNIX filesystem attributes like permissions, ownership etc.
Installation
++++++++++++
To install, just fetch the latest version from PyPI:.
pip install --upgrade robotframework-unixfilesystem
Usage
+++++
Setup in the robotframework Settings section:
============ ================
Setting Value
============ ================
Library UnixFilesystemLibrary
============ ================
\
These keyword actions are available::
Get Owner From Path:
Does an lstat on the Path and returns the owner of the file/directory:
Arguments:
- path: the path to the file/directory you wish to get ownership
on (e.g. /tmp/test.txt or ../foo)
Return:
- owner: returns the owner of the file (e.g. root or chris)
Owner From Path Should Match:
Does an lstat on the Path and checks to see if the supplied owner matches.
Returns True if a match is found or False otherwise.
Arguments:
- owner: the username to check against ownership of the path
(e.g. root or chris)
- path: the path to the file/directory you wish to get ownership
on (e.g. /tmp/test.txt or ../foo)
Return:
- returns True if the owner of the Path matches Owner, False otherwise
Get Permissions From Path As Octal
Gets the permissions via lstat of the supplied Path and returns those permissions as
an octal value.
Arguments:
- path: the path to the file/directory you wish to get ownership on
(e.g. /tmp/test.txt or ../foo)
Return:
- permissions: Returns the octal permissions of the path (e.g. 0755 or 0644)
Permissions From Path Should Match:
Gets the permissions via lstat of the supplied Path and checks if those permissions
match the supplied Permissions.
Returns True if a match is found or False otherwise.
Arguments:
- path: the path to the file/directory you wish to get ownership on
(e.g. /tmp/test.txt or ../foo)
- permissions: octal permissions (e.g. 0755 or 0644)
Return:
- returns True if the owner of the Path matches Permissions, False otherwise
Here is an example of how to use the library:
================== ========================== ===================================
Action Argument Argument
================== ========================== ===================================
${Owner}= Get Owner From Path path=/tmp/test.txt
Should Match ${Owner} root
================== ========================== ===================================
Here is an example of how to check that the owner of a path matches the supplied owner
============================ ========================== ===================================
Action Argument Argument
============================ ========================== ===================================
Owner From Path Should Match root path=/tmp/text.txt
============================ ========================== ===================================
Here is an example of how to get permissions from the path as an octal
================== ================================== ===================================
Action Argument Argument
================== ================================== ===================================
${Permissions} Get Permissions From Path as Octal path=/tmp/
Should Match ${Permissions} 0644
================== ================================== ===================================
Here is an example of how to check that permissions from the path match the octal
================================== ==========================
Action Argument
================================== ==========================
Permissions From Path Should Match 0644
================================== ==========================
License
+++++++
The robotframework-unixfilesystem is licensed under the `Apache 2.0 License
<http://www.apache.org/licenses/LICENSE-2.0.html>`_.
Metadata
Release files for robotframework-unixfilesystemlibrary 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| robotframework-unixfilesystemlibrary-0.1.0.tar.gz | 3.1 kB | Without provenance | Details for robotframework-unixfilesystemlibrary-0.1.0.tar.gz |
Release files / robotframework-unixfilesystemlibrary-0.1.0.tar.gz
| Download URL | robotframework-unixfilesystemlibrary-0.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
602e9f490a830cdf13d8d463707aad1a3836c99052af58dee5bb4868e451db10
|
|
BLAKE2b-256 checksum How to use checksums |
c5806b4b8870429e7bc817afae121670330274e6a25a2afd7fbd669fd4a2a6b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for robotframework-unixfilesystemlibrary 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.