Skip to content

Commit

Permalink
v0.14.0-alpha2
Browse files Browse the repository at this point in the history
closes #19
  • Loading branch information
pierky committed Oct 30, 2017
1 parent dff99e7 commit 8cd037c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 7 deletions.
21 changes: 16 additions & 5 deletions pierky/arouteserver/tests/live_tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ class (the one where the ``DATA`` dictionary is set) must have

CONFIG_BUILDER_CLASS = None

MOCK_PEERING_DB = True
MOCK_RIPE_RPKI_CACHE = True
MOCK_IRRDB = True
MOCK_RTTGETTER = True

# regex: for example ^65520:(\d+)$
REJECT_CAUSE_COMMUNITY = None
REJECTED_ROUTE_ANNOUNCED_BY_COMMUNITY = None
Expand Down Expand Up @@ -460,11 +465,17 @@ def get_data(self):
def _setUpClass(cls):
cls.info("{}: setting instances up...".format(cls.SHORT_DESCR))

cls.mock_cached_objects()
cls.mock_peering_db()
cls.mock_ripe_rpki_cache()
cls.mock_irrdb()
cls.mock_rttgetter()
if cls.MOCK_PEERING_DB or cls.MOCK_RIPE_RPKI_CACHE:
cls.mock_cached_objects()
if cls.MOCK_PEERING_DB:
cls.mock_peering_db()
if cls.MOCK_RIPE_RPKI_CACHE:
cls.mock_ripe_rpki_cache()
if cls.MOCK_IRRDB:
cls.mock_irrdb()
if cls.MOCK_RTTGETTER:
cls.mock_rttgetter()

try:
cls._setup_instances()
except:
Expand Down
2 changes: 1 addition & 1 deletion pierky/arouteserver/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

__version__ = "0.14.0-alpha1" # pragma: no cover
__version__ = "0.14.0-alpha2" # pragma: no cover
COPYRIGHT_YEAR = 2017 # pragma: no cover
20 changes: 19 additions & 1 deletion tests/cli
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ SUB_TEST="$LINENO"
GENERAL="$GENERAL_RS2"
build_cmd "bird" --ip-ver 4 | must_contain "router id 192.0.2.2"

# ---------------------------------------------
# RPKI ROAs as route objects invalid source
reset
TITLE="RPKI ROAs as route objects invalid source"
SUB_TEST="$LINENO"
GENERAL="tests/var/general.yml"
cat << EOF > $GENERAL
cfg:
rs_as: 999
router_id: "192.0.2.2"
filtering:
irrdb:
use_rpki_roas_as_route_objects:
enabled: true
source: "rtrlib"
EOF
build_cmd "openbgpd" | must_contain "only the 'ripe-rpki-validator-cache' value"

# ---------------------------------------------
# RFC1997 'pass' policy and bgp comms collision
reset
Expand All @@ -90,7 +108,7 @@ cfg:
prepend_once_to_any:
ext: "ro:65535:65281"
EOF
build_cmd "openbgpd" | must_contain "ro:65535:65281 and ro:65535:65282"
build_cmd "openbgpd" | must_contain "A collision has been detected with the following community: prepend_once_to_any"

# ---------------------------------------------
# custom BGP communities
Expand Down
3 changes: 3 additions & 0 deletions tests/live_tests/scenarios/rich_example/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class RichConfigExampleScenario(LiveScenario):
CLIENT_INSTANCE_CLASS = None
CONFIG_BUILDER_CLASS = None

MOCK_RIPE_RPKI_CACHE = False
MOCK_PEERING_DB = False

AS_SET = {
"AS3333": [3333],
"AS10745": [10745],
Expand Down

0 comments on commit 8cd037c

Please sign in to comment.