Sha256: f895ca353f40300a93113737fae8a6bbe21f1c2594194473f62028479d7548a7

Contents?: true

Size: 1.35 KB

Versions: 23

Compression:

Stored size: 1.35 KB

Contents

Feature: send_packets command

  In order to send/receive packets between virtual hosts
  As a developer using Trema
  I want to execute "trema send_packets" command

  Background:
    Given a file named "learning_switch.conf" with:
      """
      vswitch("learning") { datapath_id 0xabc }

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

      link "learning", "host1"
      link "learning", "host2"
      """
    And I run `trema run ../../src/examples/learning_switch/learning-switch.rb -c learning_switch.conf -d`

  @slow_process
  Scenario: Sending packets
    When I run `trema send_packets --source host1 --dest host2 --n_pkts=2`
     And I run `trema send_packets --source host2 --dest host1 --n_pkts=1`
    Then the total number of tx packets should be:
      | host1 | host2 |
      |     2 |     1 |
    And the total number of rx packets should be:
      | host1 | host2 |
      |     1 |     2 |

  @slow_process
  Scenario: unknown host error (--source)
    When I run `trema send_packets --source NO_SUCH_HOST --dest host2`
    Then the output should contain:
      """
      unknown host: NO_SUCH_HOST
      """

  @slow_process
  Scenario: unknown host error (--dest)
    When I run `trema send_packets --source host1 --dest NO_SUCH_HOST`
    Then the output should contain:
      """
      unknown host: NO_SUCH_HOST
      """

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
trema-0.4.6 features/trema_commands/send_packets.feature
trema-0.4.5 features/trema_commands/send_packets.feature
trema-0.4.4 features/trema_commands/send_packets.feature
trema-0.4.3 features/trema_commands/send_packets.feature
trema-0.4.2 features/trema_commands/send_packets.feature
trema-0.4.1 features/trema_commands/send_packets.feature
trema-0.4.0 features/trema_commands/send_packets.feature
trema-0.3.21 features/trema_commands/send_packets.feature
trema-0.3.20 features/trema_commands/send_packets.feature
trema-0.3.19 features/trema_commands/send_packets.feature
trema-0.3.18 features/trema_commands/send_packets.feature
trema-0.3.17 features/trema_commands/send_packets.feature
trema-0.3.16 features/trema_commands/send_packets.feature
trema-0.3.15 features/trema_commands/send_packets.feature
trema-0.3.14 features/trema_commands/send_packets.feature
trema-0.3.13 features/trema_commands/send_packets.feature
trema-0.3.12 features/trema_commands/send_packets.feature
trema-0.3.11 features/trema_commands/send_packets.feature
trema-0.3.10 features/trema_commands/send_packets.feature
trema-0.3.9 features/trema_commands/send_packets.feature