Sha256: bbf7a33ff60078c394cc697d7cbfe546b62fdca12e75cb6bc3b8e1144c23764e

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

Feature: -p (--port) option

  -p (--port) option overrides the default openflow channel port.

  Background:
    Given I set the environment variables to:
      | variable         | value |
      | TREMA_LOG_DIR    | .     |
      | TREMA_PID_DIR    | .     |
      | TREMA_SOCKET_DIR | .     |
    And a file named "switch_ready.rb" with:
      """ruby
      class SwitchReady < Trema::Controller
        def switch_ready(dpid)
          logger.info 'connected to port 1234'
        end
      end
      """
    And a file named "trema.conf" with:
      """ruby
      vswitch {
        datapath_id 0xabc
        port 1234
      }
      """

  @sudo
  Scenario: -p option
    When I successfully run `trema run -p 1234 switch_ready.rb -c trema.conf -d`
    And sleep 5
    Then the file "SwitchReady.log" should contain "connected to port 1234"

  @sudo
  Scenario: --port option
    When I successfully run `trema run --port 1234 switch_ready.rb -c trema.conf -d`
    And sleep 5
    Then the file "SwitchReady.log" should contain "connected to port 1234"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trema-0.10.1 features/trema_run/port_option.feature
trema-0.10.0 features/trema_run/port_option.feature
trema-0.9.0 features/trema_run/port_option.feature