diff --git a/xCAT-test/autotest/testcase/mkdef/cases1 b/xCAT-test/autotest/testcase/mkdef/cases1 index 958aa05f1..dadc5b244 100644 --- a/xCAT-test/autotest/testcase/mkdef/cases1 +++ b/xCAT-test/autotest/testcase/mkdef/cases1 @@ -61,3 +61,27 @@ check:rc==0 cmd:chtab -d node=kvms vm check:rc==0 end + +start:mkdef_regex_nicsip +description:Verify the GitHub issue #3047. +cmd:rmdef sn[01-16] +cmd:rmdef -t group -o testnicips +cmd:mkdef -t group -o testnicips +check:rc==0 +cmd:chdef -t group -o testnicips 'ip=|\D+(\d+)|172.21.254.($1%100)|' +check:rc==0 +cmd:chdef -t group -o testnicips 'nicips.eth1=|\D+(\d+)|172.20.254.($1%100)|' +check:rc==0 +cmd:lsdef -t group -o testnicips | grep -F 'nicips.eth1=|\D+(\d+)|172.20.254.($1%100)|' +check:rc==0 +cmd:mkdef sn[01-16] groups=testnicips +check:rc==0 +cmd:lsdef sn14 -c -i ip | grep -F 'ip=172.21.254.14' +check:rc==0 +cmd:lsdef sn09 -c -i nicips | grep -F 'nicips.eth1=172.20.254.9' +check:rc==0 +cmd:rmdef sn[01-16] +check:rc==0 +cmd:rmdef -t group -o testnicips +check:rc==0 +end