Sha256: 2e30982323629db48e3ae0826df1392242fd4d9c175b51484822b41c01c29195

Contents?: true

Size: 1.35 KB

Versions: 9

Compression:

Stored size: 1.35 KB

Contents

Feature: trema kill command

  In order to test event handling or just kill unwanted processes
  As a developer using Trema
  I want to execute "trema kill" command

  Background:
    Given a file named "switch_monitor.conf" with:
      """
      vswitch { datapath_id 0x1 }
      vswitch { datapath_id 0x2 }
      vswitch { datapath_id 0x3 }

      vhost "host1"
      vhost "host2"
      vhost "host3"

      link "0x1", "host1"
      link "0x2", "host2"
      link "0x3", "host3"
      """
    And I successfully run `trema run ../../src/examples/switch_monitor/switch-monitor.rb -c switch_monitor.conf -d`

  @slow_process
  Scenario: kill a switch
    When I run `trema kill 0x1`
    Then the vswitch "0x1" is terminated

  @slow_process
  Scenario: kill a host
    When I run `trema kill host1`
    Then the vhost "host1" is terminated

  @slow_process
  Scenario: kill hosts
    When I run `trema kill host1 host2`
    Then the vhost "host1" is terminated
     And the vhost "host2" is terminated

  @slow_process
  Scenario: kill a controller
    When I run `trema kill SwitchMonitor`
    Then the controller "SwitchMonitor" is terminated

  Scenario: no argument
    When I run `trema kill`
    Then the output should contain "name is required"

  Scenario: wrong name
    When I run `trema kill nosuchname`
    Then the output should contain "unknown name: nosuchname"

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
trema-0.3.5 features/trema.kill.feature
trema-0.3.4 features/trema.kill.feature
trema-0.3.3 features/trema.kill.feature
trema-0.3.2 features/trema.kill.feature
trema-0.3.1 features/trema.kill.feature
trema-0.3.0 features/trema.kill.feature
trema-0.2.8 features/trema.kill.feature
trema-0.2.7 features/trema.kill.feature
trema-0.2.6 features/trema.kill.feature