openbmc / openbmc-test-automation

Apache License 2.0
100 stars 92 forks source link

Settings Menu. Test Network Sub Menu #2237

Open justin0309 opened 7 months ago

justin0309 commented 7 months ago

1.Configure And Verify DNS Server Via GUI Regarding this test item, because our test environment uses a dhcp server, there will originally be /etc/udhcpc.d/50default: Adding DNS 168.95.1.1 in /etc/resolv.conf. But is it normal that this IP will not appear on the web page?

image

image

2.This test item will try to join an ip server of 10.10.10.10 and verify whether the deletion is successful. Testing can be done. But in the end, it will be verified whether resolv.conf is empty.

So the test will fail because the original dns server IP still exists. If I want the test to pass, is it reasonable to manually delete nameserver 168.95.1.1 before testing?

gkeishin commented 7 months ago

@prkatti1 can you respond to this ?

prkatti1 commented 7 months ago

@justin0309 This is file should be updated automatically and not meant for manual update in case on BMC. Static name servers configurations, deletion & modifications to be done via GUI or Redfish and not via writing to a file manually.

To test: Add DNS server/s via GUI/Redfish Delete DNS servers via GUI/Redfish

justin0309 commented 7 months ago

@prkatti1 Let me explain again, our test environment uses a dncp server, so when dncp assigns an IP, it will automatically add Nameserver 168.95.1.1 to /etc/resolv.conf. Nameserver 168.95.1.1 will not show up on the web page, so when executing the test, the final check to see if the nameserver is empty will fail. Or can you tell me if your test environment also uses dncp or static ip?

prkatti1 commented 7 months ago

Yeah, code is designed in such a way that this should run in any kind of environment. There are 2 things: static nameservers- which are manually configured nameservers- which are not configured manually

nameservers that are not configured manually, can't be deleted/modified nameservers that are not configured manually, will be displayed only in redfish get output

can you elaborate a bit which one you are trying & what problem you are facing??

justin0309 commented 7 months ago

@prkatti1 udhcpc image cat /etc/resolv.conf image image I use dhcp. As I said, the robot test will eventually verify whether the nameserver is empty, but the original 168.95.1.1 still exists, so the test will fail.

prkatti1 commented 7 months ago

Ahh OK, it is a GUI test code issue. @meghagn5 use the same logic that is used in non GUI tests.

meghagn5 commented 7 months ago

Am working on it & will push the fix

prkatti1 commented 7 months ago

@justin0309 @swe12345 Pls take a look & review https://gerrit.openbmc.org/c/openbmc/openbmc-test-automation/+/68669

justin0309 commented 7 months ago

@prkatti1 The test project Configure And verify DNS Server Via GUI looks normal, but I'm not sure if the IP runs away when others test it. Thanks.