Skip to content

Make GCU syslog's test independent from previous test#4839

Merged
wen587 merged 7 commits intosonic-net:masterfrom
wen587:gu_syslog_m
Dec 24, 2021
Merged

Make GCU syslog's test independent from previous test#4839
wen587 merged 7 commits intosonic-net:masterfrom
wen587:gu_syslog_m

Conversation

@wen587
Copy link
Contributor

@wen587 wen587 commented Dec 13, 2021

Description of PR

Summary: Make GCU syslog test independent from previous test
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

To avoid testing on one test case that is dependent on the previous test.

How did you do it?

Setup prerequisite environment for each test

How did you verify/test it?

Run test of sonic-mgmt/tests/generic_config_updater/test_syslog.py on KVM

Any platform specific information?

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

Documentation

@wen587 wen587 marked this pull request as ready for review December 22, 2021 06:33
@wen587 wen587 requested a review from a team as a code owner December 22, 2021 06:33
@wen587 wen587 requested a review from qiluo-msft December 22, 2021 06:33
original_syslog_servers: original syslog servers stored in config
"""
duthost = duthosts[rand_one_dut_hostname]
create_checkpoint(duthost)
Copy link
Contributor

@qiluo-msft qiluo-msft Dec 22, 2021

Choose a reason for hiding this comment

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

create_checkpoint

Since the apply patch test starting from yield, should we create a checkpoint just before yield? #Closed

Copy link
Contributor Author

@wen587 wen587 Dec 23, 2021

Choose a reason for hiding this comment

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

We want it to rolled back to original setup. Cuz the test env is based on original setup.
If we created before yield, it will rollback to config_cleanup or config_add_default and we will need to add rollback check for each setup.
To move the checkpoint just before yield, we can either

  1. move each setup code inside test,
  2. or do another rollback to original setup.

or we can keep the current setup.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's a good idea to rollback twice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add second rollback

@wen587 wen587 merged commit abe6d78 into sonic-net:master Dec 24, 2021
AntonHryshchuk pushed a commit to AntonHryshchuk/sonic-mgmt that referenced this pull request Jan 4, 2022
sonic-net#4839)

Summary:
Make syslog test run independently; add rollback test.

What is the motivation for this PR?
To avoid testing on one test case that is dependent on the previous test.

How did you do it?
Setup prerequisite environment for each test and rollback to original setup

How did you verify/test it?
Run test of sonic-mgmt/tests/generic_config_updater/test_syslog.py on KVM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants