Sha256: 9316bab7a7dbd6b2e229e3ef0adb3ee1cee3ca3a2144dbf73dfe94d657a40b1f

Contents?: true

Size: 1.22 KB

Versions: 2

Compression:

Stored size: 1.22 KB

Contents

Feature: reset_stats
  Background:
    Given I set the environment variables to:
      | variable         | value |
      | TREMA_LOG_DIR    | .     |
      | TREMA_PID_DIR    | .     |
      | TREMA_SOCKET_DIR | .     |
    And a file named "flood.rb" with:
      """ruby
      class Flood < Trema::Controller
        def packet_in(datapath_id, message)
          send_packet_out(
            datapath_id,
            packet_in: message,
            actions: SendOutPort.new(:flood)
          )
        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'
      """

  @sudo
  Scenario: run controller_file
    When I successfully run `trema run flood.rb -c trema.conf -d` 
    And I successfully run `trema send_packets --source host1 --dest host2`
    And I successfully run `trema reset_stats`
    Then I successfully run `trema show_stats host1`
    And the output from "trema show_stats host1" should contain exactly ""
    And I successfully run `trema show_stats host2`
    And the output from "trema show_stats host2" should contain exactly ""

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trema-0.10.1 features/trema_reset_stats/reset_stats.feature
trema-0.10.0 features/trema_reset_stats/reset_stats.feature