GRE gre input nodes not registerd unless configured
(self)
| 49 | super(TestGREInputNodes, self).tearDown() |
| 50 | |
| 51 | def test_gre_input_node(self): |
| 52 | """GRE gre input nodes not registerd unless configured""" |
| 53 | pkt = ( |
| 54 | Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) |
| 55 | / IP(src=self.pg0.remote_ip4, dst=self.pg0.local_ip4) |
| 56 | / GRE() |
| 57 | ) |
| 58 | |
| 59 | self.pg0.add_stream(pkt) |
| 60 | self.pg_start() |
| 61 | # no tunnel created, gre-input not registered |
| 62 | err = self.statistics.get_counter("/err/ip4-local/unknown_protocol")[0] |
| 63 | self.assertEqual(err, 1) |
| 64 | err_count = err |
| 65 | |
| 66 | # create gre tunnel |
| 67 | gre_if = VppGreInterface(self, self.pg0.local_ip4, "1.1.1.2") |
| 68 | self.assertFalse(gre_if.query_vpp_config()) |
| 69 | |
| 70 | gre_if.add_vpp_config() |
| 71 | self.assertTrue(gre_if.query_vpp_config()) |
| 72 | |
| 73 | self.pg0.add_stream(pkt) |
| 74 | self.pg_start() |
| 75 | # tunnel created, gre-input registered |
| 76 | err = self.statistics.get_counter("/err/ip4-local/unknown_protocol")[0] |
| 77 | # expect no new errors |
| 78 | self.assertEqual(err, err_count) |
| 79 | |
| 80 | |
| 81 | @unittest.skipIf("gre" in config.excluded_plugins, "Exclude GRE plugin tests") |
nothing calls this directly
no test coverage detected