LFC Test Plan

LFC is the LCG File Catalogue. The reference card with links to documentation is available here: GliteLFC. LFC provides CLI, perl and python APIs that needs to be tested. Man pages of these commands can be found here: LFC CLI description

Product Description and Version

LFC 1.8.2-3

https://svnweb.cern.ch/trac/lcgdm/wiki/Lfc/Admin/ReferenceCard

Unit tests

This product does not use unit tests

Deployment tests

Install from scratch and upgrade from last production version

System tests

Features/Scenarios to be tested

  • Command Line Interface
  • Perl API
  • Python API
  • Special use-cases

Documentation

  • There should be a man page for each CLI tool and API libraries. Bash scripts that test the availability of the LFC CLI tools and API libraries can be found here:

  • The tool should support -h and --help

Command Line Interface (incomplete)

The command line interface provides a series of commands that users can use create, list, modify and delete entries from the catalogue. This is the list of the available commands, in parenthesis we state whether the relative test is present or missing:

lfc-chgrp (missing)          
lfc-chmod (ok)               
lfc-chown (missing)        
lfc-delcomment (ok)
lfc-entergrpmap (missing)
lfc-enterusrmap (missing) 
lfc-getacl (ok) 
lfc-listgrpmap (missing) 
lfc-listusrmap (missing)
lfc-ln (ok)
lfc-ls (ok)
lfc-mkdir (ok)
lfc-modifygrpmap (missing)
lfc-modifyusrmap (missing) 
lfc-ping (ok)
lfc-rename (ok)
lfc-rm (ok)
lfc-rmgrpmap (missing)
lfc-rmusrmap (missing)
lfc-setacl (ok)
lfc-setcomment (ok)

General CLI test

All the commands listed above must be tested providing good and bad arguments. Whit bad arguments (type or number) the CLI has to return a proper error message and a non zero exit code. In the following sections we list some specific cases for each command that needs to be considered.

lfc-chgrp

Change group ownership of a LFC directory/file in the name server

 lfc-chgrp [-h] [-R] group path...

  • providing as input a directory/file that does not exists the command should a proper error code (not implemented).

lfc-chmod

Change access mode of a LFC directory/file in the name server:

 lfc-chmod absolute_mode path...

* using symbolic mode should return a proper message * using a non valid absolute mode (e.g 3333 or 900) should return a proper error message * providing a path that does not start with '/' should give an error message when the variable LFC_HOME is not set or it has an invalid value

lfc-chown

Change owner and group of a LFC directory/file in the name server.

 lfc-chown [-h] [-R] owner[:group] path...
 lfc-chown [-h] [-R] :group path...

  • Providing a non existing file/directory should return a proper error message.
  • When the effective user ID of the process does not match the owner of the file or the caller does not have ADMIN privileges, the command should return a proper error code.

lfc-delcomment

Delete the comment associated with a file/directory.

 lfc-delcomment path

  • Providing a non existing file/directory should return a proper error message.
  • When the effective user ID of the process does not match the owner of the file or the caller does not have ADMIN privileges, the command should return a proper error code.

lfc-entergrpmap

Define a new group entry in Virtual Id table.

  lfc-entergrpmap [ --gid gid ] --group groupname

  • When the caller does not have ADMIN privileges the command should return a proper error message.

lfc-enterusrmap

Define a new user entry in Virtual Id table

  lfc-enterusrmap [ --uid uid ] --user username

  • When the caller does not have ADMIN privileges the command should return a proper error message.

lfc-getacl

Gets the Access Control List associated with a LFC directory/file

  lfc-getacl [-a] [-d] path...

  • Providing a non existing file/directory should return a proper error message.

lfc-listgrpmap

Query about a given group or list all existing groups in virtual gid table.

  lfc-listgrpmap [ --gid gid ] [ --group groupname ]

  • Providing a non existing gid or groupname the command should return a proper error code.

lfc-listusrmap

Queries about a given user or lists all existing users in virtual uid table.

  lfc-listusrmap [ --uid uid ] [ --user username ]

  • Providing a non existing uid or username the command should return a proper error code.

lfc-ln

Makes a symbolic link to a file or a directory in the LFC Name Server.

  lfc-ln -s target [ linkname ]
  lfc-ln -s target...  directory

  • Providing a non existing target should return a proper error code.
  • When user does not have privileges on linkname's parent directory the command should return a proper error message.

lfc-ls

List LFC name server directory/file entries

  lfc-ls  [-cdiLlRTu]  [--class] [--comment] [--deleted] [--display_side] [--ds] path...

  • Providing a non existing path should return a proper error code.

lfc-mkdir

Creates the specified LFC directories in the name server.

  lfc-mkdir [-m mode] [-p] path...

  • Check that default mode is 777
  • When user has no permission on parent directory the command should report a proper error message.

lfc-modifygrpmap

Modifies the group entry corresponding to a given virtual gid.

  lfc-modifygrpmap --gid gid --group newname

  • When user has no ADMIN privileges the command should report a proper error message.
  • When the gid does not exist the command should report a proper error message

lfc-modifyusrmap

Modifies the user entry corresponding to a given virtual uid.

  lfc-modifyusrmap --uid uid --user newname

  • When user has no ADMIN privileges the command should report a proper error message.
  • When the uid does not exist the command should report a proper error message

lfc-ping

Check if name server is alive and print its version number

  lfc-ping [ -h server ]

  • When the server specified does not exist the command should report a proper error message.

lfc-rename

Rename a LFC file or directory in the name server

  lfc-rename oldpath newpath

  • When the oldpath does not exist the command should report a proper error message.
  • When the user has no right on the newpath's parent directory the command should report a proper error message.

lfc-rm

Remove LFC files or directories in the name server

  lfc-rm [-f] [-i] filename...
  lfc-rm [-f] [-i] -r dirname...

  • A proper error should be reported when providing a non existing file/directory.
  • A proper error should be reported when the use has no right on the parent directory.

lfc-rmgrpmap

Suppresses the group entry corresponding to a given virtual gid or group name. If both are specified, they must point at the same entry.

  lfc-rmgrpmap --gid gid --group groupname

  • The command should report a proper error message when the user has no ADMIN privileges.
  • The command should report a proper error message when the provided gid does not exists.

lfc-rmusrmap

Suppress user entry corresponding to a given virtual uid or user name.

  lfc-rmusrmap --uid uid --user username

  • The command should report a proper error message when the user has no ADMIN privileges.
  • The command should report a proper error message when the provided uid does not exists.

lfc-setacl

Sets the Access Control List associated with a LFC directory/file.

  lfc-setacl [-d] [-m] [-s] acl_entries path...

  • The command should report a proper error message when the user has no ADMIN privileges or when the effective user ID of the process does not match the owner of the file.

lfc-setcomment

Add/replace a comment associated with a file/directory.

  lfc-setcomment path comment

  • The command should report a proper error message when the user has no ADMIN privileges or when the effective user ID of the process does not match the owner of the file.
  • The command should report a proper error message when the file/directory does not exist.

Perl API (not implemented)

Python API

Features not to be tested

'Feature Summary'

Description and explanation for not being included in the current test plan

-- GianniPucciani - 27 Mar 2009

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r9 - 2011-10-19 - OliverKeeble
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EGEE All webs login

This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Ask a support question or Send feedback