Skip to content

Commit

Permalink
Add e2e test for merge-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Sep 25, 2024
1 parent 85f9d72 commit 5b3cc7d
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions cli-tests/cli-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,27 @@

mvn clean package --no-transfer-progress -DskipTests -Dmaven.source.skip=true -Dmaven.javadoc.skip=true

EXAMPLE_1="example.gtfs.zip"
EXAMPLE_2="deathvalley.gtfs.zip"

# transformer-cli

TRANSFORMER_JAR="transformer-cli.jar"

cp onebusaway-gtfs-transformer-cli/target/onebusaway-gtfs-transformer-cli.jar ./${TRANSFORMER_JAR}
wget https://github.com/google/transit/blob/master/gtfs/spec/en/examples/sample-feed-1.zip?raw=true -O gtfs.zip
wget https://github.com/google/transit/blob/master/gtfs/spec/en/examples/sample-feed-1.zip?raw=true -O ${EXAMPLE_1}

java -jar ${TRANSFORMER_JAR} --help

java -jar ${TRANSFORMER_JAR} --transform="{'op':'remove','match':{'file':'stops.txt','stop_id':'BEATTY_AIRPORT'}}" gtfs.zip gtfs.transformed.zip
java -jar ${TRANSFORMER_JAR} --transform="{'op':'remove','match':{'file':'stops.txt','stop_id':'BEATTY_AIRPORT'}}" ${EXAMPLE_1} gtfs.transformed.zip

# merge-cli

MERGE_JAR="merge-cli.jar"

cp onebusaway-gtfs-merge-cli/target/onebusaway-gtfs-merge-cli-*.jar ./${MERGE_JAR}
wget "http://data.trilliumtransit.com/gtfs/deathvalley-demo-ca-us/deathvalley-demo-ca-us.zip" -O ${EXAMPLE_2}

java -jar ${MERGE_JAR} --help

java -jar ${MERGE_JAR} ${EXAMPLE_1} ${EXAMPLE_2} gtfs.merged.zip

0 comments on commit 5b3cc7d

Please sign in to comment.