Sha256: e4cca54ca72dc8676b6ac97f5609408e651f384605a8dac0e255a648d4d65e57
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
Feature: trema run command Background: Given I set the environment variables to: | variable | value | | TREMA_LOG_DIR | . | | TREMA_PID_DIR | . | | TREMA_SOCKET_DIR | . | @sudo Scenario: the default port Given a file named "switch_ready.rb" with: """ class SwitchReady < Trema::Controller def switch_ready(dpid) logger.info format('Hello %s!', dpid.to_hex) end end """ And a file named "trema.conf" with: """ vswitch { datapath_id 0xabc } """ When I successfully run `trema -v run switch_ready.rb -c trema.conf -d` And I run `sleep 5` Then the file "SwitchReady.log" should contain "Hello 0xabc!" @sudo Scenario: -p option Given a file named "switch_ready.rb" with: """ class SwitchReady < Trema::Controller def switch_ready(dpid) logger.info format('Hello %s!', dpid.to_hex) end end """ And a file named "trema.conf" with: """ vswitch { datapath_id 0xabc port 1234 } """ When I successfully run `trema -v run -p 1234 switch_ready.rb -c trema.conf -d` And I run `sleep 5` Then the file "SwitchReady.log" should contain "Hello 0xabc!" @sudo Scenario: trema run empty file and error Given a file named "empty.rb" with: """ """ When I run `trema -v run empty.rb` Then the exit status should not be 0 And the stderr should contain: """ No controller class is defined. """
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
trema-0.5.0 | features/trema_run.feature |