Contents

Checking ports

In order to test a running system As an administrator I want to examine executables

Background Given that "cuken/runnable" has been required

Scenario: An executable exists

  • Then the file at "/users/foo/bin/executeme" is executable

Scenario: An executable is executable by user, group, and other

  • Then the file at "/users/foo/bin/executeme" is executable by ugo

Scenario: An executable is executable by only its owning user

  • Then the file at "/users/foo/bin/executeme" is executable by u

Scenario: An executable is executable by group and other

  • Then the file at "/users/foo/bin/executeme" is executable by go

Scenario: An executable is executable by a specific user

  • Then the file at "/users/foo/bin/executeme" is executable by "foo_user"

Scenario: An executable has the setuid bit set

  • Then the file at "/users/foo/bin/executeme" is a setuid executable

Scenario: An executable has the setgid bit set

  • Then the file at "/users/foo/bin/executeme" is a setgid executable

Scenario: A list of executables should be properly owned and executable

  • Then these executables exist:
    fileexecutors
    /Users/foo/bin/groupg
    /Users/foo/bin/useru
    /Users/foo/bin/othero
    /Users/foo/bin/gandugu
    /Users/foo/bin/oandggo
    /Users/foo/bin/oanduou
    /Users/foo/bin/allogu
  • Then these executables exist:
    fileuser
    /Users/foo/bin/userfoo_user
    /Users/foo/bin/otherfoo_user
    /Users/foo/bin/gandufoo_user
    /Users/foo/bin/oandgfoo_user
    /Users/foo/bin/oandufoo_user
    /Users/foo/bin/allfoo_user
    /Users/foo/bin/nobodynobody
    /Users/foo/bin/rootroot
  • Then these executables exist:
    fileusersetuidsetgid
    /Users/foo/bin/setuidfoo_usertruefalse
    /Users/foo/bin/setgidfoo_userfalsetrue
    /Users/foo/bin/userfoo_userfalsefalse

Scenario: A command should print a specific string

  • Then the command "python --version" yields "Python 2.7.1"

Scenario: A command's response should contain a specific string

  • Then the command "java -version" yields a response containing "java version "1.6.0_33""

Scenario: A list of commands respond properly

  • Then these executables respond properly:
    commandresponse
    echo hellohello
    unameDarwin
    whoamifoo_user
  • Then these executables respond properly:
    commandresponse contains
    java -versionjava version "1.6.0_33"
    python --versionPython 2.7.1

Source: features/runnable_examples/process.feature at commit efec2546, Cuken (Apache-2.0 license).