Sha256: 7eda357962f42627e66e177a31bebb49fa74326f2b5d8d712d2d70998f92490a

Contents?: true

Size: 1.23 KB

Versions: 8

Compression:

Stored size: 1.23 KB

Contents

Feature: stop
  Background:
    Given a file named "switch_disconnected_controller.rb" with:
      """ruby
      class SwitchDisconnectedController < Trema::Controller
        def switch_disconnected(dpid)
          logger.info "Switch #{dpid.to_hex} is disconnected."
        end
      end
      """
    And a file named "trema.conf" with:
      """ruby
      vswitch { datapath_id 0xabc }

      vhost('host1') { ip '192.168.0.1' }
      vhost('host2') { ip '192.168.0.2' }

      link '0xabc', 'host1'
      link '0xabc', 'host2'
      """
    And I trema run "switch_disconnected_controller.rb" with the configuration "trema.conf"

  @sudo
  Scenario: stop a switch
    When I successfully run `trema stop 0xabc`
    And I successfully run `sleep 10`
    Then the file "SwitchDisconnectedController.log" should contain:
      """
      Switch 0xabc is disconnected.
      """

  @sudo
  Scenario: stop a host
    When I successfully run `trema stop host1`
    And I successfully run `sleep 5`
    Then the file "vhost.host1.pid" should not exist

  @sudo
  Scenario: stop NO_SUCH_NAME
    When I run `trema stop NO_SUCH_NAME`
    Then the exit status should not be 0
    And the output should contain:
    """
    "NO_SUCH_NAME" does not exist.
    """

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
trema-0.8.4 features/trema_stop/stop.feature
trema-0.8.3 features/trema_stop/stop.feature
trema-0.8.2 features/trema_stop/stop.feature
trema-0.8.1 features/trema_stop/stop.feature
trema-0.8.0 features/trema_stop/stop.feature
trema-0.7.1 features/trema_stop/stop.feature
trema-0.7.0 features/trema_stop/stop.feature
trema-0.6.0 features/trema_stop/stop.feature