Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 19fe0f8

Browse files
committed
Add docker-compose for integration testing
* Will mount a GoRTR with a basic rpki.json and slurm.json * Run rtrdump
1 parent c54d5f4 commit 19fe0f8

File tree

4 files changed

+86
-0
lines changed

4 files changed

+86
-0
lines changed

.travis.yml

+16
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,19 @@ jobs:
4444
- docker
4545
script:
4646
- make docker-gortr
47+
- stage: integration
48+
dist: trusty
49+
services:
50+
- docker
51+
env:
52+
- DOCKER_COMPOSE_VERSION=1.25.4
53+
before_install:
54+
- sudo rm /usr/local/bin/docker-compose
55+
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
56+
- chmod +x docker-compose
57+
- sudo mv docker-compose /usr/local/bin
58+
- docker-compose -f docker-compose-integration.yml up -d --build
59+
script:
60+
- docker-compose -f docker-compose-integration.yml run rtrdump
61+
after_script:
62+
- docker-compose -f docker-compose-integration.yml down

cmd/gortr/test.rpki.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"metadata": {
3+
"counts": 1,
4+
"generated": 1577865600,
5+
"valid": 1577866200,
6+
"serial": 1
7+
},
8+
"roas": [
9+
{
10+
"prefix": "10.0.0.0/25",
11+
"maxLength": 26,
12+
"asn": "AS65000",
13+
"ta": "Test ROA"
14+
},
15+
{
16+
"prefix": "10.1.0.0/25",
17+
"maxLength": 26,
18+
"asn": "AS65001",
19+
"ta": "Test ROA"
20+
}
21+
]
22+
}

cmd/gortr/test.slurm.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"slurmVersion": 1,
3+
"validationOutputFilters": {
4+
"prefixFilters": [
5+
{
6+
"asn": 65000,
7+
"prefix": "10.0.0.0/24"
8+
}
9+
],
10+
"bgpsecFilters": []
11+
},
12+
"locallyAddedAssertions": {
13+
"prefixAssertions": [
14+
{
15+
"asn": 65002,
16+
"prefix": "10.2.0.0/25",
17+
"maxPrefixLength": 26
18+
}
19+
]
20+
}
21+
}

docker-compose-integration.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: '3'
2+
services:
3+
gortr:
4+
build:
5+
dockerfile: Dockerfile.gortr
6+
context: .
7+
command:
8+
- -cache
9+
- rpki.json
10+
- -slurm
11+
- slurm.json
12+
- -verify=false
13+
- -checktime=false
14+
volumes:
15+
- ./cmd/gortr/test.rpki.json:/rpki.json
16+
- ./cmd/gortr/test.slurm.json:/slurm.json
17+
rtrdump:
18+
build:
19+
dockerfile: Dockerfile.rtrdump
20+
context: .
21+
command:
22+
- -connect
23+
- gortr:8282
24+
- -file
25+
- ""
26+
depends_on:
27+
- gortr

0 commit comments

Comments
 (0)