Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

This page defines test cases for the NDSLabs command line utility (ndslabsctl). 

...

  • Preconditions
    • Admin is logged in
  • Test steps
    • ndslabsctl list projects
  • Expected results
    • Projects are listed
      • Problem: ID is displayed

Service administration

Add service (admin only)

  • Preconditions:
    • Admin is logged in
  • Test steps
    • ndslabsctl add service -f <service.json>
    • ndslabsctl add service --file <service.json>
  • Expected results
    • Service is added. User can add service/stack.
  • Alternate flows
    • Service exists with same key (409 conflict)
    • Logged in user is not admin (401 unauthorized)
  • Notes:
    • See ndslabs-specs repos for sample services

Delete service (admin only)

...

  • Admin is logged in

...

  • ndslabsctl delete service <key>

...

  • Service is deleted

...


...

Get service details

  • Preconditions
    • User is logged in
  • Test steps
    • ndslabsctl get service <key>
  • Expected results
    • Displays service spec (as json)
  • Alternate flows:
    • Service does not exist (404

List services

  • Preconditions
    • User is logged in
  • Test steps
    • ndslabsctl list services
  • Expected results
    • Services are listed

Stack administration

  • Admin user can create / start / stop stacks. We will need to revisit the workflow for admin.

Add stack

 

  • Preconditions
    • Logged in
    • Service exists
  • Test steps
    • ndslabsctl add stack <key> <name> 
    • ndslabsctl add stack <key> <name> --opt=<comma-separated list of optional services>
  • Expected results
    • Stack is added
  • Alternate flow
    • Not logged in (401)
    • Service doesn't exist (404)
    • Duplicate stack name (409)

...

  • Preconditions:
    • Logged in
    • Stack exists
    • Stack not running
  • Test steps
    • ndslabsctl delete stack <sid>
    • Stack is deleted (201)
  • Alternate flow
    • Not logged in (401)
    • Stack doesn't exist (404)
    • Stack is running (409)
    • Attached volumes are orphaned

Get stack details

  • Preconditions:
    • Logged in
    • Stack exists
  • Test steps
    • ndslabsctl get stack <sid>
  • Expected results
    • Stack details, including endpoints and config, are displayed
  • Alternate flow
    • Not logged in (401)
    • Stack doesn't exist (404)

Start stack

  • Preconditions
    • Logged in
    • Stack exists and started
  • Test steps
    • ndslabsctl start <sid>
  • Expected results
    • All stack services (service, replication controller, pods) are started and ready
  • Alternate flow
    • Not logged in (401)
    • Stack doesn't exist (404)
    • Stack not started or stopping (409)

Stop stack

  • Preconditions
    • Stack started
  • Test steps
    • ndslabsctl stop <sid>
  • Expected results
    • Stack service, replication controller, pods are stopped (200)
  • Alternative flow
    • Not logged in (401)
    • Stack does not exist (404)
    • Stack not started (200)

Service administration

Add service (admin only)

  • Preconditions:
    • Admin is logged in
  • Test steps
    • ndslabsctl add service -f <service.json>
    • ndslabsctl add service --file <service.json>
  • Expected results
    • Service is added. User can add service/stack.
  • Alternate flows
    • Service exists with same key (409 conflict)
    • Logged in user is not admin (401 unauthorized)
  • Notes:
    • See ndslabs-specs repos for sample services

Delete service (admin only)

  • Preconditions
    • Admin is logged in
  • Test steps
    • ndslabsctl delete service <key>
  • Expected results
    • Service is deleted
  • Alternate flows:
    • Project does not exist (404 not found) 
    • User is not admin (401 unauthorized)
    • Not logged in (401)
    • Not admin user (401)
    • Service is in use by projects (409)
    • Service required by other services (409)
    • No such service (404)

Get service details

  • Preconditions
    • User is logged in
  • Test steps
    • ndslabsctl get service <key>
  • Expected results
    • Displays service spec (as json)
  • Alternate flows:
    • Service does not exist (404

List services

  • Preconditions
    • User is logged in
  • Test steps
    • ndslabsctl list services
  • Expected results
    • Services are listed

Volume administration

  • Create / delete volume feel a bit inconsistent

Create volume

  • Preconditions
    • Logged in
    • Sufficient quota remaining (not implemented)
  • Test steps
    • ndslabsctl create <vol name> <vol size GB>
      • Creates a detached volume
    • ndslabsctl create <vol name> <vol size GB> <sid>
      • Creates and attaches volume
  • Expected results
    • Volume is created
    • Volume is created and attached
  • Alternate flow
    • Not logged in (401)
    • Insufficient quota (409) (not implemented)
    • Duplicate name (409)
    • Stack doesn't exist (404)

...