Skip to content

Commit 3e92d84

Browse files
authored
verify_dns_name_resolution_after_upgrade - mark node dirty after OS u… (#4511)
* verify_dns_name_resolution_after_upgrade - mark node dirty after OS update After OS upgrade sometimes kernel version may change. When LISA is used to validate a VM image with specific kernel version, changing the kernel will result in running tests with undesired kernel which should be avoided. Marking the node dirty after OS update to avoid such issues. * move mark_dirty to after_case --------- Co-authored-by: Srikanth Myakam <374767+SRIKKANTH@users.noreply.github.com>
1 parent a18cef0 commit 3e92d84

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • lisa/microsoft/testsuites/core

lisa/microsoft/testsuites/core/dns.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
from __future__ import annotations
44

55
import re
6+
from typing import Any
67

78
from lisa import (
9+
Logger,
810
Node,
911
TestCaseMetadata,
1012
TestSuite,
@@ -39,6 +41,11 @@ class Dns(TestSuite):
3941
r"ModuleNotFoundError: No module named \'apt_inst\'", re.M
4042
)
4143

44+
def after_case(self, log: Logger, **kwargs: Any) -> None:
45+
log.debug("after_case: mark node as dirty to avoid affecting other test cases")
46+
node = kwargs["node"]
47+
node.mark_dirty()
48+
4249
@TestCaseMetadata(
4350
description="""
4451
This test case check DNS name resolution by ping bing.com.

0 commit comments

Comments
 (0)