From: Sebastian Schrader Date: Fri, 19 Oct 2018 15:29:33 +0000 (+0200) Subject: [5184] Verify authoriative flag shared-network X-Git-Tag: 259-libyang-adapt-authoritative_base~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=121c30d0f010e033cfecd5f1c8566ae87068a834;p=thirdparty%2Fkea.git [5184] Verify authoriative flag shared-network --- diff --git a/src/bin/dhcp4/tests/config_parser_unittest.cc b/src/bin/dhcp4/tests/config_parser_unittest.cc index b2ec1cdb86..33bbd99c40 100644 --- a/src/bin/dhcp4/tests/config_parser_unittest.cc +++ b/src/bin/dhcp4/tests/config_parser_unittest.cc @@ -5772,6 +5772,7 @@ TEST_F(Dhcp4ParserTest, sharedNetworksDerive) { " \"name\": \"foo\"\n," // shared network values here " \"interface\": \"eth0\",\n" " \"match-client-id\": false,\n" + " \"authoritative\": true,\n" " \"next-server\": \"1.2.3.4\",\n" " \"server-hostname\": \"foo\",\n" " \"boot-file-name\": \"bar\",\n" @@ -5846,6 +5847,7 @@ TEST_F(Dhcp4ParserTest, sharedNetworksDerive) { // These are values derived from shared network scope: EXPECT_EQ("eth0", s->getIface()); EXPECT_FALSE(s->getMatchClientId()); + EXPECT_TRUE(s->getAuthoritative()); EXPECT_EQ(IOAddress("1.2.3.4"), s->getSiaddr()); EXPECT_EQ("foo", s->getSname()); EXPECT_EQ("bar", s->getFilename()); @@ -5861,6 +5863,7 @@ TEST_F(Dhcp4ParserTest, sharedNetworksDerive) { // These are values derived from shared network scope: EXPECT_EQ("eth0", s->getIface()); EXPECT_TRUE(s->getMatchClientId()); + EXPECT_TRUE(s->getAuthoritative()); EXPECT_EQ(IOAddress("11.22.33.44"), s->getSiaddr()); EXPECT_EQ("some-name.example.org", s->getSname()); EXPECT_EQ("bootfile.efi", s->getFilename()); @@ -5880,6 +5883,7 @@ TEST_F(Dhcp4ParserTest, sharedNetworksDerive) { s = checkSubnet(*subs, "192.0.3.0/24", 1, 2, 4); EXPECT_EQ("", s->getIface()); EXPECT_TRUE(s->getMatchClientId()); + EXPECT_FALSE(s->getAuthoritative()); EXPECT_EQ(IOAddress("0.0.0.0"), s->getSiaddr()); EXPECT_TRUE(s->getSname().empty()); EXPECT_TRUE(s->getFilename().empty());