Skip to content

[pytest] Add test_gen_spytestbed.py to generate Spytest testbed file#2015

Merged
lolyu merged 2 commits intosonic-net:masterfrom
lolyu:gen_spytest_testbed
Aug 11, 2020
Merged

[pytest] Add test_gen_spytestbed.py to generate Spytest testbed file#2015
lolyu merged 2 commits intosonic-net:masterfrom
lolyu:gen_spytest_testbed

Conversation

@lolyu
Copy link
Collaborator

@lolyu lolyu commented Aug 3, 2020

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Add template file tests/template/spytest_testbed.yaml.j2 as the
    testbed template.
  • Add a testcase:
    tests/testbed_setup/test_gen_spy_testbed.py::test_gen_spy_testbed to
    generate the testbed file for Spytest and save as
    spytest/testbeds/spytest_testbed.yaml.
  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

To automate the process to generate testbed file from the connection graph files.

How did you do it?

How did you verify/test it?

pytest --inventory ../ansible/lab --host-pattern all -vvv --show-capture stdout --testbed spytest --testbed_file ../ansible/testbed.csv --disable_loganalyzer --log-file-level debug --pdb --skip_sanity -s testbed_setup/test_gen_spy_testbed.py

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

For graph files that includes links between DUTs(`fullmesh` topo for
Spytest), `conn_graph_facts` should skip those links when parsing vlan
configs for links(connected to Fanout switch).

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@lolyu lolyu force-pushed the gen_spytest_testbed branch from 8563ee5 to b0fde62 Compare August 3, 2020 08:42
@lolyu lolyu changed the title [pytest] Add test_gen_spytestbed.py to generate Spytest testbed file [pytest] Add test_gen_spytestbed.py to generate Spytest testbed file Aug 3, 2020
@lolyu lolyu force-pushed the gen_spytest_testbed branch from b0fde62 to b5db019 Compare August 3, 2020 09:47
@lolyu lolyu force-pushed the gen_spytest_testbed branch 2 times, most recently from de4469d to 25163ac Compare August 3, 2020 10:52
@lolyu lolyu requested a review from a team August 3, 2020 10:53
@lolyu lolyu force-pushed the gen_spytest_testbed branch 2 times, most recently from 3a8e7e3 to 2c59916 Compare August 4, 2020 01:55
* Add template file `tests/template/spytest_testbed.yaml.j2` as the
testbed template.
* Add a testcase:
`tests/testbed_setup/test_gen_spy_testbed.py::test_gen_spy_testbed` to
generate the testbed file for Spytest and save as
`spytest/testbeds/spytest_testbed.yaml`.

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@lolyu lolyu force-pushed the gen_spytest_testbed branch from 2c59916 to d8f4ad1 Compare August 4, 2020 08:07
@lolyu
Copy link
Collaborator Author

lolyu commented Aug 5, 2020

retest this please.

Copy link
Contributor

@daall daall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an example spytest testbed file somewhere? This looks OK to me but I am also not 100% sure what the end result is supposed to look like. :)

@lolyu lolyu merged commit bcc3211 into sonic-net:master Aug 11, 2020
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
c31a362 - 2021-11-18 : [202012][Mux orch] set default as standby, change mux orch priority (sonic-net#2015) [Prince Sunny]
9a9e8e6 - 2021-11-18 : [202012] Check VS test failure (sonic-net#2033) [Prince Sunny]
7eaabca - 2021-11-11 : [202012] Fix random failure in PR/CI build. (sonic-net#2016) [Shilong Liu]
85230fe - 2021-11-04 : [orchagent] Fix group name of port-buffer-drop in flexcounterorch.cpp (sonic-net#1967) [Junchao-Mellanox]
a55c2ca - 2021-11-03 : [teammgrd]: Handle LAGs cleanup gracefully on Warm/Fast reboot. (sonic-net#1934) [Nazarii Hnydyn]
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
51712aa [build-failure-fix][GCU] Sort referrer paths alphabetically (sonic-net#2015)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants