3 Commits

Author SHA1 Message Date
Aaron U'Ren
ae9d0e31e8 fix(bgp_policies_test.go): actually test policy
Previously, this section was commented out and full testing to ensure
that the policies matched was not performed. Now the unit tests are more
complete and actually test that the expected policies are present.
2021-05-17 12:08:36 -05:00
Aaron U'Ren
fa7bcdeb06 fix(bgp_policies_test.go): use startBgpServer()
Use startBgpServer() rather than doing things individually, so that we
can follow the logic path of how kube-router actually works better. This
allows us to use annotations rather than set stuff manually and allows
us to test more of the code-path of the NRC.

Additionally, this change allows us to actually test some errors better
such as, make sure that startBgpServer() actually throws the error we
expect when only one part of the prepend ASN annotation is present.
Previously, we were not actually testing this code path.
2021-05-17 12:08:36 -05:00
Aaron U'Ren
a5d6560751 fact(bgp_policies_test): move BGP policy tests into their own file 2021-05-17 12:08:36 -05:00