Skip to content

Commit

Permalink
Move tests to tests/ subfolder (#1443)
Browse files Browse the repository at this point in the history
* Move tests to tests/ subfolder
  • Loading branch information
dhalperi committed May 20, 2018
1 parent 1ced212 commit f257b6f
Show file tree
Hide file tree
Showing 36 changed files with 89 additions and 89 deletions.
4 changes: 2 additions & 2 deletions .travis/build.sh
Expand Up @@ -18,10 +18,10 @@ batfish_test_all || exit 1
export ALLINONE_JAVA_ARGS="-enableassertions -DbatfishCoordinatorPropertiesPath=${BATFISH_ROOT}/.travis/travis_coordinator.properties"

echo -e "\n ..... Running parsing tests"
allinone -cmdfile test_rigs/parsing-tests/commands || exit 1
allinone -cmdfile tests/parsing-tests/commands || exit 1

echo -e "\n ..... Running parsing tests with error"
allinone -cmdfile test_rigs/parsing-errors-tests/commands || exit 1
allinone -cmdfile tests/parsing-errors-tests/commands || exit 1

echo -e "\n ..... Running basic client tests"
allinone -cmdfile tests/basic/commands || exit 1
Expand Down
43 changes: 0 additions & 43 deletions test_rigs/parsing-errors-tests/commands

This file was deleted.

44 changes: 0 additions & 44 deletions test_rigs/parsing-tests/commands

This file was deleted.

43 changes: 43 additions & 0 deletions tests/parsing-errors-tests/commands
@@ -0,0 +1,43 @@
### DEFAULT BEHAVIOR: RECOVER FROM AND IGNORE UNRECOGNIZED LINES
#parsing error
test -compareall tests/parsing-errors-tests/recovery-parsing-error.ref init-testrig test_rigs/example-parsing-error
test -compareall tests/parsing-errors-tests/recovery-no-verbose.ref get initinfo verboseError=false
#test -compareall tests/parsing-errors-tests/verbose.ref get initinfo verboseError=true

#parsing Iptables error
test -compareall tests/parsing-errors-tests/recovery-init-invalid-iptables.ref init-testrig test_rigs/example-parsing-error/invalid-iptables
test -compareall tests/parsing-errors-tests/recovery-invalid-ip-no-verbose.ref get initinfo

#all config files failed in parsing step
test -compareall tests/parsing-errors-tests/recovery-all-parsing-failed.ref init-testrig test_rigs/example-parsing-error/all-fail

### ALLOW RECOVERY DURING PARSING, BUT CRASH AFTER POST-PROCESSING IN PRESENCE OF UNRECOGNIZED LINES
add-batfish-option urf false

#parsing error
test -compareall tests/parsing-errors-tests/nourf-parsing-error.ref init-testrig test_rigs/example-parsing-error
test -compareall tests/parsing-errors-tests/nourf-no-verbose.ref get initinfo verboseError=false
#test -compareall tests/parsing-errors-tests/verbose.ref get initinfo verboseError=true

#parsing Iptables error
test -compareall tests/parsing-errors-tests/nourf-init-invalid-iptables.ref init-testrig test_rigs/example-parsing-error/invalid-iptables
test -compareall tests/parsing-errors-tests/nourf-invalid-ip-no-verbose.ref get initinfo

#all config files failed in parsing step
test -compareall tests/parsing-errors-tests/nourf-all-parsing-failed.ref init-testrig test_rigs/example-parsing-error/all-fail

### DISABLE RECOVERY ALTOGETHER SO THAT UNRECOGNIZED LINES CAUSE PARSING FAILURE
add-batfish-option disableunrecognized

#parsing error
test -compareall tests/parsing-errors-tests/parsing-error.ref init-testrig test_rigs/example-parsing-error
test -compareall tests/parsing-errors-tests/no-verbose.ref get initinfo verboseError=false
#test -compareall tests/parsing-errors-tests/verbose.ref get initinfo verboseError=true

#parsing Iptables error
test -compareall tests/parsing-errors-tests/init-invalid-iptables.ref init-testrig test_rigs/example-parsing-error/invalid-iptables
test -compareall tests/parsing-errors-tests/invalid-ip-no-verbose.ref get initinfo

#all config files failed in parsing step
test -compareall tests/parsing-errors-tests/all-parsing-failed.ref init-testrig test_rigs/example-parsing-error/all-fail

File renamed without changes.
File renamed without changes.
44 changes: 44 additions & 0 deletions tests/parsing-tests/commands
@@ -0,0 +1,44 @@
#this file assumes that we are running from top-level source directory

add-batfish-option ppt
add-batfish-option verboseparse
add-batfish-option haltonconverterror
add-batfish-option haltonparseerror
add-batfish-option disableunrecognized

#dc-as-reuse
test -compareall tests/parsing-tests/dc-as-reuse.ref init-testrig test_rigs/dc-as-reuse

#disable-as-suppression
test -compareall tests/parsing-tests/disable-as-suppression.ref init-testrig test_rigs/disable-as-suppression

#example
test -compareall tests/parsing-tests/example.ref init-testrig test_rigs/example

#example-juniper
test -compareall tests/parsing-tests/example-juniper.ref init-testrig test_rigs/example-juniper

#indirection
test -compareall tests/parsing-tests/indirection.ref init-testrig test_rigs/indirection

#ios_rt
test -compareall tests/parsing-tests/ios_rt.ref init-testrig test_rigs/ios_rt
test -compareall tests/parsing-tests/ios_rt-initInfo.ref get initInfo environmentRoutes=true

#isis
test -compareall tests/parsing-tests/isis.ref init-testrig test_rigs/isis

#policy-routing
test -compareall tests/parsing-tests/policy-routing.ref init-testrig test_rigs/policy-routing

#snat
test -compareall tests/parsing-tests/snat.ref init-testrig test_rigs/snat

#srx-testbed
test -compareall tests/parsing-tests/srx-testbed.ref init-testrig test_rigs/srx-testbed

#unit-tests
test -compareall tests/parsing-tests/unit-tests.ref init-testrig test_rigs/unit-tests
test tests/parsing-tests/unit-tests-undefined.ref get undefinedreferences
test tests/parsing-tests/unit-tests-unused.ref get unusedstructures
test tests/parsing-tests/unit-tests-nodes.ref get nodes summary=false
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f257b6f

Please sign in to comment.