Skip to content

Commit

Permalink
add additional detail to e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbalogh committed Jan 8, 2021
1 parent 5a4dd23 commit dfdd89d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions snappi/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ def get_config():
status=200)


@app.route('/control/transmit', methods=['POST'])
def set_transmit_state():
global CONFIG
return Response(status=200)


@app.route('/results/port', methods=['POST'])
def get_port_metrics():
import snappi
Expand Down
17 changes: 17 additions & 0 deletions snappi/tests/test_e2e_port_flow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@ def test_e2e_port_flow_config():
api.set_config(config)
print(api.get_config())

# start transmit
transmit_state = api.transmit_state()
transmit_state.state = 'start'
api.set_transmit_state(transmit_state)

# get port metrics
port_metrics_request = api.port_metrics_request()
port_metrics = api.get_port_metrics(port_metrics_request)
for metric in port_metrics:
print(metric)

# get flow metrics
flow_metrics_request = api.flow_metrics_request()
flow_metrics = api.get_flow_metrics(flow_metrics_request)
for metric in flow_metrics:
print(metric)


if __name__ == '__main__':
pytest.main(['-vv', '-s', __file__])

0 comments on commit dfdd89d

Please sign in to comment.