From 81a28a91975829f83f3de2e9b2514807cddae2c8 Mon Sep 17 00:00:00 2001 From: Barry O'Donovan Date: Mon, 20 Sep 2021 11:45:19 +0100 Subject: [PATCH] [CI] Refactor from Travis -> Github Actions --- .../workflows/{laravel.yml => ci-dusk.yml} | 14 +- .github/workflows/ci-ex-dusk.yml | 35 ++++ .idea/IXP-Manager.iml | 1 + app/Utils/Export/JsonSchema.php | 2 +- .../ci_test_db.sql} | 0 data/{travis-ci => ci}/known-good/README | 0 .../api-v4-member-export-0.6-auth.json | 32 ++-- .../api-v4-member-export-0.6-unauth.json | 27 ++- .../api-v4-member-export-0.7-auth.json | 32 ++-- .../api-v4-member-export-0.7-unauth.json | 27 ++- .../api-v4-member-export-1.0-auth.json | 30 +++- .../api-v4-member-export-1.0-unauth.json | 25 ++- .../known-good/ci-apiv4-as112-lan1-ipv4.conf | 0 .../known-good/ci-apiv4-as112-lan1-ipv6.conf | 0 .../known-good/ci-apiv4-as112-lan2-ipv4.conf | 0 .../known-good/ci-apiv4-as112-lan2-ipv6.conf | 0 .../known-good/ci-apiv4-b2-rc1-lan1-ipv4.conf | 0 .../known-good/ci-apiv4-b2-rc1-lan1-ipv6.conf | 0 .../known-good/ci-apiv4-b2-rs1-lan1-ipv4.conf | 0 .../known-good/ci-apiv4-b2-rs1-lan1-ipv6.conf | 0 .../known-good/ci-apiv4-rc1-lan1-ipv4.conf | 0 .../known-good/ci-apiv4-rc1-lan1-ipv6.conf | 0 .../known-good/ci-apiv4-rc1-lan2-ipv4.conf | 0 .../known-good/ci-apiv4-rc1-lan2-ipv6.conf | 0 .../known-good/ci-apiv4-rs1-lan1-ipv4.conf | 0 .../known-good/ci-apiv4-rs1-lan1-ipv6.conf | 0 .../known-good/ci-apiv4-rs1-lan2-ipv4.conf | 0 .../known-good/ci-apiv4-rs1-lan2-ipv6.conf | 0 .../known-good/ci-apiv4-yaml-1.yaml | 0 .../known-good/ci-apiv4-yaml-2.yaml | 0 .../known-good/ci-apiv4-yaml-switch1.yaml | 0 .../known-good/ci-apiv4-yaml-switch2.yaml | 0 .../known-good/ci-services-grapher-mrtg.conf | 154 ++++++++++++++++-- ...rvices-grapher-smokeping-vlanid1-ipv4.conf | 0 ...rvices-grapher-smokeping-vlanid1-ipv6.conf | 0 ...rvices-grapher-smokeping-vlanid2-ipv4.conf | 0 ...rvices-grapher-smokeping-vlanid2-ipv6.conf | 0 .../known-good/regenerate.sh | 0 data/{travis-ci => ci}/phpunit.xml | 0 data/travis-ci/after_failure.sh | 37 ----- data/travis-ci/setup_tests.sh | 45 ----- phpunit.xml | 14 +- tests/Services/Grapher/Backends/MrtgTest.php | 2 +- .../Grapher/Backends/SmokepingTest.php | 2 +- .../GenerateConfigurationBird1AS112Test.php | 2 +- ...enerateConfigurationBird1CollectorTest.php | 2 +- .../GenerateConfigurationBird1ServerTest.php | 2 +- ...enerateConfigurationBird2CollectorTest.php | 2 +- .../GenerateConfigurationBird2ServerTest.php | 2 +- tests/Utils/IxfMemberExportTest.php | 2 +- 50 files changed, 330 insertions(+), 161 deletions(-) rename .github/workflows/{laravel.yml => ci-dusk.yml} (82%) create mode 100644 .github/workflows/ci-ex-dusk.yml rename data/{travis-ci/travis_ci_test_db.sql => ci/ci_test_db.sql} (100%) rename data/{travis-ci => ci}/known-good/README (100%) rename data/{travis-ci => ci}/known-good/api-v4-member-export-0.6-auth.json (94%) rename data/{travis-ci => ci}/known-good/api-v4-member-export-0.6-unauth.json (94%) rename data/{travis-ci => ci}/known-good/api-v4-member-export-0.7-auth.json (94%) rename data/{travis-ci => ci}/known-good/api-v4-member-export-0.7-unauth.json (94%) rename data/{travis-ci => ci}/known-good/api-v4-member-export-1.0-auth.json (94%) rename data/{travis-ci => ci}/known-good/api-v4-member-export-1.0-unauth.json (94%) rename data/{travis-ci => ci}/known-good/ci-apiv4-as112-lan1-ipv4.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-as112-lan1-ipv6.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-as112-lan2-ipv4.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-as112-lan2-ipv6.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-b2-rc1-lan1-ipv4.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-b2-rc1-lan1-ipv6.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-b2-rs1-lan1-ipv4.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-b2-rs1-lan1-ipv6.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-rc1-lan1-ipv4.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-rc1-lan1-ipv6.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-rc1-lan2-ipv4.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-rc1-lan2-ipv6.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-rs1-lan1-ipv4.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-rs1-lan1-ipv6.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-rs1-lan2-ipv4.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-rs1-lan2-ipv6.conf (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-yaml-1.yaml (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-yaml-2.yaml (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-yaml-switch1.yaml (100%) rename data/{travis-ci => ci}/known-good/ci-apiv4-yaml-switch2.yaml (100%) rename data/{travis-ci => ci}/known-good/ci-services-grapher-mrtg.conf (91%) rename data/{travis-ci => ci}/known-good/ci-services-grapher-smokeping-vlanid1-ipv4.conf (100%) rename data/{travis-ci => ci}/known-good/ci-services-grapher-smokeping-vlanid1-ipv6.conf (100%) rename data/{travis-ci => ci}/known-good/ci-services-grapher-smokeping-vlanid2-ipv4.conf (100%) rename data/{travis-ci => ci}/known-good/ci-services-grapher-smokeping-vlanid2-ipv6.conf (100%) rename data/{travis-ci => ci}/known-good/regenerate.sh (100%) rename data/{travis-ci => ci}/phpunit.xml (100%) delete mode 100755 data/travis-ci/after_failure.sh delete mode 100755 data/travis-ci/setup_tests.sh diff --git a/.github/workflows/laravel.yml b/.github/workflows/ci-dusk.yml similarity index 82% rename from .github/workflows/laravel.yml rename to .github/workflows/ci-dusk.yml index 624bf8d00..a6be29253 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/ci-dusk.yml @@ -1,10 +1,6 @@ -name: Laravel +name: CI - Dusk / Browser -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] +on: workflow_dispatch jobs: laravel-tests: @@ -32,10 +28,12 @@ jobs: run: chmod -R 777 storage bootstrap/cache - name: Create Database run: | - cat data/travis-ci/travis_ci_test_db.sql | mysql --default-character-set=utf8mb4 -h 127.0.0.1 -u root myapp_test + cat data/ci/ci_test_db.sql | mysql --default-character-set=utf8mb4 -h 127.0.0.1 -u root myapp_test - name: Set up Dusk and php serve run: | php ./artisan serve &>php-built-in.log & google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost & - name: Execute tests (Unit and Feature tests) via PHPUnit - run: vendor/bin/phpunit + run: vendor/bin/phpunit --testsuite 'Dusk / Browser Test Suite' + + diff --git a/.github/workflows/ci-ex-dusk.yml b/.github/workflows/ci-ex-dusk.yml new file mode 100644 index 000000000..863e46f02 --- /dev/null +++ b/.github/workflows/ci-ex-dusk.yml @@ -0,0 +1,35 @@ +name: CI (exc. Dusk/Browser) + +on: [ push, pull_request ] + +jobs: + ci-ex-dusk: + + runs-on: ubuntu-latest + + steps: + - uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e + with: + php-version: '8.0' + - uses: actions/checkout@v2 + - uses: shogo82148/actions-setup-mysql@v1 + with: + mysql-version: '8.0' + - run: mysql -uroot -h127.0.0.1 -e 'CREATE DATABASE myapp_test' + - name: Copy .env + run: php -r "file_exists('.env') || copy('.env.ci', '.env');" + - name: Install bgpq3 + run: sudo apt-get install bgpq3 + - name: Install Dependencies + run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + - name: Directory Permissions + run: chmod -R 777 storage bootstrap/cache + - name: Create Database + run: | + cat data/ci/ci_test_db.sql | mysql --default-character-set=utf8mb4 -h 127.0.0.1 -u root myapp_test + - name: Set up php server + run: | + php ./artisan serve &>php-built-in.log & + - name: Execute tests (Unit and Feature tests) via PHPUnit + run: vendor/bin/phpunit --testsuite 'Docstore Test Suite,IXP Manager Test Suite' + diff --git a/.idea/IXP-Manager.iml b/.idea/IXP-Manager.iml index 2a3f62a66..e15b909f7 100644 --- a/.idea/IXP-Manager.iml +++ b/.idea/IXP-Manager.iml @@ -7,6 +7,7 @@ + diff --git a/app/Utils/Export/JsonSchema.php b/app/Utils/Export/JsonSchema.php index 319ad573d..6ee573bb9 100644 --- a/app/Utils/Export/JsonSchema.php +++ b/app/Utils/Export/JsonSchema.php @@ -482,7 +482,7 @@ private function getMemberInfo( string $version, bool $detailed, bool $tags ): a if( $tags ) { $memberinfo[ $cnt ][ 'ixp_manager' ][ 'tags' ] = []; foreach( $c->tags as $tag ) { - if( !$tag->internal_only || ( Auth::check() && Auth::user()->isSuperUser ) ) { + if( !$tag->internal_only || ( Auth::check() && Auth::user()->isSuperUser() ) ) { $memberinfo[ $cnt ][ 'ixp_manager' ][ 'tags' ][ $tag->tag ] = $tag->display_as; } } diff --git a/data/travis-ci/travis_ci_test_db.sql b/data/ci/ci_test_db.sql similarity index 100% rename from data/travis-ci/travis_ci_test_db.sql rename to data/ci/ci_test_db.sql diff --git a/data/travis-ci/known-good/README b/data/ci/known-good/README similarity index 100% rename from data/travis-ci/known-good/README rename to data/ci/known-good/README diff --git a/data/travis-ci/known-good/api-v4-member-export-0.6-auth.json b/data/ci/known-good/api-v4-member-export-0.6-auth.json similarity index 94% rename from data/travis-ci/known-good/api-v4-member-export-0.6-auth.json rename to data/ci/known-good/api-v4-member-export-0.6-auth.json index a44ce9d0d..f3f8db775 100644 --- a/data/travis-ci/known-good/api-v4-member-export-0.6-auth.json +++ b/data/ci/known-good/api-v4-member-export-0.6-auth.json @@ -1,7 +1,7 @@ { "version": "0.6", "generator": "IXP Manager v999.9.9", - "timestamp": "2018-06-19T13:57:26Z", + "timestamp": "2021-09-20T09:14:25Z", "ixp_list": [ { "shortname": "Infrastructure #1", @@ -87,7 +87,10 @@ "" ], "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -129,9 +132,11 @@ ], "ixp_manager": { "tags": { - "test-tag1": "Test Tag1", - "test-tag2": "Test Tag2" - } + "test-tag1": "Test Tag1" + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -192,7 +197,10 @@ "" ], "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -275,9 +283,10 @@ "peering_policy_url": "http:\/\/www.siep.com\/noc\/", "contact_hours": "24x7", "ixp_manager": { - "tags": { - "test-tag2": "Test Tag2" - } + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [] }, @@ -297,7 +306,10 @@ "ixp_manager": { "tags": { "test-tag1": "Test Tag1" - } + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { diff --git a/data/travis-ci/known-good/api-v4-member-export-0.6-unauth.json b/data/ci/known-good/api-v4-member-export-0.6-unauth.json similarity index 94% rename from data/travis-ci/known-good/api-v4-member-export-0.6-unauth.json rename to data/ci/known-good/api-v4-member-export-0.6-unauth.json index 045412c86..8308486c0 100644 --- a/data/travis-ci/known-good/api-v4-member-export-0.6-unauth.json +++ b/data/ci/known-good/api-v4-member-export-0.6-unauth.json @@ -1,7 +1,7 @@ { "version": "0.6", "generator": "IXP Manager v999.9.9", - "timestamp": "2018-06-19T13:57:43Z", + "timestamp": "2021-09-20T09:13:50Z", "ixp_list": [ { "shortname": "Infrastructure #1", @@ -81,7 +81,10 @@ "peering_policy": "open", "member_type": "peering", "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -118,7 +121,10 @@ "ixp_manager": { "tags": { "test-tag1": "Test Tag1" - } + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -173,7 +179,10 @@ "peering_policy": "open", "member_type": "peering", "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -248,7 +257,10 @@ "peering_policy": "mandatory", "member_type": "ixp", "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [] }, @@ -262,7 +274,10 @@ "ixp_manager": { "tags": { "test-tag1": "Test Tag1" - } + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { diff --git a/data/travis-ci/known-good/api-v4-member-export-0.7-auth.json b/data/ci/known-good/api-v4-member-export-0.7-auth.json similarity index 94% rename from data/travis-ci/known-good/api-v4-member-export-0.7-auth.json rename to data/ci/known-good/api-v4-member-export-0.7-auth.json index 0b6394717..8593fee17 100644 --- a/data/travis-ci/known-good/api-v4-member-export-0.7-auth.json +++ b/data/ci/known-good/api-v4-member-export-0.7-auth.json @@ -1,7 +1,7 @@ { "version": "0.7", "generator": "IXP Manager v999.9.9", - "timestamp": "2018-06-19T13:57:11Z", + "timestamp": "2021-09-20T09:12:54Z", "ixp_list": [ { "shortname": "Infrastructure #1", @@ -91,7 +91,10 @@ "" ], "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -133,9 +136,11 @@ ], "ixp_manager": { "tags": { - "test-tag1": "Test Tag1", - "test-tag2": "Test Tag2" - } + "test-tag1": "Test Tag1" + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -196,7 +201,10 @@ "" ], "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -279,9 +287,10 @@ "peering_policy_url": "http:\/\/www.siep.com\/noc\/", "contact_hours": "24x7", "ixp_manager": { - "tags": { - "test-tag2": "Test Tag2" - } + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [] }, @@ -301,7 +310,10 @@ "ixp_manager": { "tags": { "test-tag1": "Test Tag1" - } + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { diff --git a/data/travis-ci/known-good/api-v4-member-export-0.7-unauth.json b/data/ci/known-good/api-v4-member-export-0.7-unauth.json similarity index 94% rename from data/travis-ci/known-good/api-v4-member-export-0.7-unauth.json rename to data/ci/known-good/api-v4-member-export-0.7-unauth.json index 8bd5678b5..d620d3a44 100644 --- a/data/travis-ci/known-good/api-v4-member-export-0.7-unauth.json +++ b/data/ci/known-good/api-v4-member-export-0.7-unauth.json @@ -1,7 +1,7 @@ { "version": "0.7", "generator": "IXP Manager v999.9.9", - "timestamp": "2018-06-19T13:57:41Z", + "timestamp": "2021-09-20T09:11:01Z", "ixp_list": [ { "shortname": "Infrastructure #1", @@ -85,7 +85,10 @@ "peering_policy": "open", "member_type": "peering", "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -122,7 +125,10 @@ "ixp_manager": { "tags": { "test-tag1": "Test Tag1" - } + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -177,7 +183,10 @@ "peering_policy": "open", "member_type": "peering", "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -252,7 +261,10 @@ "peering_policy": "mandatory", "member_type": "ixp", "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [] }, @@ -266,7 +278,10 @@ "ixp_manager": { "tags": { "test-tag1": "Test Tag1" - } + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { diff --git a/data/travis-ci/known-good/api-v4-member-export-1.0-auth.json b/data/ci/known-good/api-v4-member-export-1.0-auth.json similarity index 94% rename from data/travis-ci/known-good/api-v4-member-export-1.0-auth.json rename to data/ci/known-good/api-v4-member-export-1.0-auth.json index adbf96e39..3fea902f3 100644 --- a/data/travis-ci/known-good/api-v4-member-export-1.0-auth.json +++ b/data/ci/known-good/api-v4-member-export-1.0-auth.json @@ -93,7 +93,10 @@ "" ], "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -135,9 +138,11 @@ ], "ixp_manager": { "tags": { - "test-tag1": "Test Tag1", - "test-tag2": "Test Tag2" - } + "test-tag1": "Test Tag1" + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -198,7 +203,10 @@ "" ], "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -281,9 +289,10 @@ "peering_policy_url": "http:\/\/www.siep.com\/noc\/", "contact_hours": "24x7", "ixp_manager": { - "tags": { - "test-tag2": "Test Tag2" - } + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [] }, @@ -303,7 +312,10 @@ "ixp_manager": { "tags": { "test-tag1": "Test Tag1" - } + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { diff --git a/data/travis-ci/known-good/api-v4-member-export-1.0-unauth.json b/data/ci/known-good/api-v4-member-export-1.0-unauth.json similarity index 94% rename from data/travis-ci/known-good/api-v4-member-export-1.0-unauth.json rename to data/ci/known-good/api-v4-member-export-1.0-unauth.json index 5d95730a2..4f120cd9c 100644 --- a/data/travis-ci/known-good/api-v4-member-export-1.0-unauth.json +++ b/data/ci/known-good/api-v4-member-export-1.0-unauth.json @@ -87,7 +87,10 @@ "peering_policy": "open", "member_type": "peering", "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -124,7 +127,10 @@ "ixp_manager": { "tags": { "test-tag1": "Test Tag1" - } + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -179,7 +185,10 @@ "peering_policy": "open", "member_type": "peering", "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { @@ -254,7 +263,10 @@ "peering_policy": "mandatory", "member_type": "ixp", "ixp_manager": { - "tags": [] + "tags": [], + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [] }, @@ -268,7 +280,10 @@ "ixp_manager": { "tags": { "test-tag1": "Test Tag1" - } + }, + "in_manrs": false, + "is_reseller": false, + "is_resold": false }, "connection_list": [ { diff --git a/data/travis-ci/known-good/ci-apiv4-as112-lan1-ipv4.conf b/data/ci/known-good/ci-apiv4-as112-lan1-ipv4.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-as112-lan1-ipv4.conf rename to data/ci/known-good/ci-apiv4-as112-lan1-ipv4.conf diff --git a/data/travis-ci/known-good/ci-apiv4-as112-lan1-ipv6.conf b/data/ci/known-good/ci-apiv4-as112-lan1-ipv6.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-as112-lan1-ipv6.conf rename to data/ci/known-good/ci-apiv4-as112-lan1-ipv6.conf diff --git a/data/travis-ci/known-good/ci-apiv4-as112-lan2-ipv4.conf b/data/ci/known-good/ci-apiv4-as112-lan2-ipv4.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-as112-lan2-ipv4.conf rename to data/ci/known-good/ci-apiv4-as112-lan2-ipv4.conf diff --git a/data/travis-ci/known-good/ci-apiv4-as112-lan2-ipv6.conf b/data/ci/known-good/ci-apiv4-as112-lan2-ipv6.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-as112-lan2-ipv6.conf rename to data/ci/known-good/ci-apiv4-as112-lan2-ipv6.conf diff --git a/data/travis-ci/known-good/ci-apiv4-b2-rc1-lan1-ipv4.conf b/data/ci/known-good/ci-apiv4-b2-rc1-lan1-ipv4.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-b2-rc1-lan1-ipv4.conf rename to data/ci/known-good/ci-apiv4-b2-rc1-lan1-ipv4.conf diff --git a/data/travis-ci/known-good/ci-apiv4-b2-rc1-lan1-ipv6.conf b/data/ci/known-good/ci-apiv4-b2-rc1-lan1-ipv6.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-b2-rc1-lan1-ipv6.conf rename to data/ci/known-good/ci-apiv4-b2-rc1-lan1-ipv6.conf diff --git a/data/travis-ci/known-good/ci-apiv4-b2-rs1-lan1-ipv4.conf b/data/ci/known-good/ci-apiv4-b2-rs1-lan1-ipv4.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-b2-rs1-lan1-ipv4.conf rename to data/ci/known-good/ci-apiv4-b2-rs1-lan1-ipv4.conf diff --git a/data/travis-ci/known-good/ci-apiv4-b2-rs1-lan1-ipv6.conf b/data/ci/known-good/ci-apiv4-b2-rs1-lan1-ipv6.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-b2-rs1-lan1-ipv6.conf rename to data/ci/known-good/ci-apiv4-b2-rs1-lan1-ipv6.conf diff --git a/data/travis-ci/known-good/ci-apiv4-rc1-lan1-ipv4.conf b/data/ci/known-good/ci-apiv4-rc1-lan1-ipv4.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-rc1-lan1-ipv4.conf rename to data/ci/known-good/ci-apiv4-rc1-lan1-ipv4.conf diff --git a/data/travis-ci/known-good/ci-apiv4-rc1-lan1-ipv6.conf b/data/ci/known-good/ci-apiv4-rc1-lan1-ipv6.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-rc1-lan1-ipv6.conf rename to data/ci/known-good/ci-apiv4-rc1-lan1-ipv6.conf diff --git a/data/travis-ci/known-good/ci-apiv4-rc1-lan2-ipv4.conf b/data/ci/known-good/ci-apiv4-rc1-lan2-ipv4.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-rc1-lan2-ipv4.conf rename to data/ci/known-good/ci-apiv4-rc1-lan2-ipv4.conf diff --git a/data/travis-ci/known-good/ci-apiv4-rc1-lan2-ipv6.conf b/data/ci/known-good/ci-apiv4-rc1-lan2-ipv6.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-rc1-lan2-ipv6.conf rename to data/ci/known-good/ci-apiv4-rc1-lan2-ipv6.conf diff --git a/data/travis-ci/known-good/ci-apiv4-rs1-lan1-ipv4.conf b/data/ci/known-good/ci-apiv4-rs1-lan1-ipv4.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-rs1-lan1-ipv4.conf rename to data/ci/known-good/ci-apiv4-rs1-lan1-ipv4.conf diff --git a/data/travis-ci/known-good/ci-apiv4-rs1-lan1-ipv6.conf b/data/ci/known-good/ci-apiv4-rs1-lan1-ipv6.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-rs1-lan1-ipv6.conf rename to data/ci/known-good/ci-apiv4-rs1-lan1-ipv6.conf diff --git a/data/travis-ci/known-good/ci-apiv4-rs1-lan2-ipv4.conf b/data/ci/known-good/ci-apiv4-rs1-lan2-ipv4.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-rs1-lan2-ipv4.conf rename to data/ci/known-good/ci-apiv4-rs1-lan2-ipv4.conf diff --git a/data/travis-ci/known-good/ci-apiv4-rs1-lan2-ipv6.conf b/data/ci/known-good/ci-apiv4-rs1-lan2-ipv6.conf similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-rs1-lan2-ipv6.conf rename to data/ci/known-good/ci-apiv4-rs1-lan2-ipv6.conf diff --git a/data/travis-ci/known-good/ci-apiv4-yaml-1.yaml b/data/ci/known-good/ci-apiv4-yaml-1.yaml similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-yaml-1.yaml rename to data/ci/known-good/ci-apiv4-yaml-1.yaml diff --git a/data/travis-ci/known-good/ci-apiv4-yaml-2.yaml b/data/ci/known-good/ci-apiv4-yaml-2.yaml similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-yaml-2.yaml rename to data/ci/known-good/ci-apiv4-yaml-2.yaml diff --git a/data/travis-ci/known-good/ci-apiv4-yaml-switch1.yaml b/data/ci/known-good/ci-apiv4-yaml-switch1.yaml similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-yaml-switch1.yaml rename to data/ci/known-good/ci-apiv4-yaml-switch1.yaml diff --git a/data/travis-ci/known-good/ci-apiv4-yaml-switch2.yaml b/data/ci/known-good/ci-apiv4-yaml-switch2.yaml similarity index 100% rename from data/travis-ci/known-good/ci-apiv4-yaml-switch2.yaml rename to data/ci/known-good/ci-apiv4-yaml-switch2.yaml diff --git a/data/travis-ci/known-good/ci-services-grapher-mrtg.conf b/data/ci/known-good/ci-services-grapher-mrtg.conf similarity index 91% rename from data/travis-ci/known-good/ci-services-grapher-mrtg.conf rename to data/ci/known-good/ci-services-grapher-mrtg.conf index 8957c488b..3595676fa 100644 --- a/data/travis-ci/known-good/ci-services-grapher-mrtg.conf +++ b/data/ci/known-good/ci-services-grapher-mrtg.conf @@ -1,7 +1,7 @@ ### DO NOT EDIT THIS FILE - IT IS AUTOMATICALLY GENERATED ### -### Source: /Users/barryo/dev/ixp-inex/resources/views/services/grapher/mrtg/header.foil.php -### Generated: 2019-11-04 16:49:53 +### Source: /Users/barryo/dev/ixpm-inex/resources/views/services/grapher/mrtg/header.foil.php +### Generated: 2021-09-20 10:16:18 # # IXP Manager MRTG configuration file @@ -26,7 +26,7 @@ PageTop[_]:

*** CONFIG IDENTITY IN .env *** Traffic Analysis

PageFoot[_]: + Based on configuration last generated by IXP Manager at 2021-09-20 10:16:18
- Based on configuration last generated by IXP Manager at 2019-11-04 16:49:53
@@ -40,7 +40,7 @@ PageFoot[_]: ### ### AGGREGATE GRAPHS ### -### Source: /Users/barryo/dev/ixp-inex/resources/views/services/grapher/mrtg/aggregates.foil.php +### Source: /Users/barryo/dev/ixpm-inex/resources/views/services/grapher/mrtg/aggregates.foil.php ### ##################################################################################################################### ##################################################################################################################### @@ -324,6 +324,132 @@ MaxBytes[ixp001-bcasts]: 27578125 Directory[ixp001-bcasts]: ixp +##################################################################################################################### +##################################################################################################################### +##################################################################################################################### + + +##################################################################################################################### +##################################################################################################################### +##################################################################################################################### +### +### +### +### LOCATION AGGREGATE GRAPHS +### +### Source: /Users/barryo/dev/ixpm-inex/resources/views/services/grapher/mrtg/location-aggregates.foil.php +### +##################################################################################################################### +##################################################################################################################### +##################################################################################################################### + + +##################################################################################################################### +# +# location-aggregate-00001-bits +# + +Target[location-aggregate-00001-bits]: + 1.3.6.1.2.1.31.1.1.1.6#GigabitEthernet3&1.3.6.1.2.1.31.1.1.1.10#GigabitEthernet3:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.6#GigabitEthernet4&1.3.6.1.2.1.31.1.1.1.10#GigabitEthernet4:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.6#GigabitEthernet1&1.3.6.1.2.1.31.1.1.1.10#GigabitEthernet1:public@s2:::::2 + + 1.3.6.1.2.1.31.1.1.1.6#GigabitEthernet8&1.3.6.1.2.1.31.1.1.1.10#GigabitEthernet8:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.6#GigabitEthernet6&1.3.6.1.2.1.31.1.1.1.10#GigabitEthernet6:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.6#GigabitEthernet6&1.3.6.1.2.1.31.1.1.1.10#GigabitEthernet6:public@s2:::::2 + + 1.3.6.1.2.1.31.1.1.1.6#GigabitEthernet9&1.3.6.1.2.1.31.1.1.1.10#GigabitEthernet9:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.6#GigabitEthernet8&1.3.6.1.2.1.31.1.1.1.10#GigabitEthernet8:public@s2:::::2 +Title[location-aggregate-00001-bits]: *** CONFIG IDENTITY IN .env *** - Peering Bits / second on Location 1 +Options[location-aggregate-00001-bits]: growright,bits , pngdate +YLegend[location-aggregate-00001-bits]: Bits / Second +MaxBytes[location-aggregate-00001-bits]: 1765000000 +Directory[location-aggregate-00001-bits]: locations/001 + + +##################################################################################################################### +# +# location-aggregate-00001-pkts +# + +Target[location-aggregate-00001-pkts]: + 1.3.6.1.2.1.31.1.1.1.7#GigabitEthernet3&1.3.6.1.2.1.31.1.1.1.11#GigabitEthernet3:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.7#GigabitEthernet4&1.3.6.1.2.1.31.1.1.1.11#GigabitEthernet4:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.7#GigabitEthernet1&1.3.6.1.2.1.31.1.1.1.11#GigabitEthernet1:public@s2:::::2 + + 1.3.6.1.2.1.31.1.1.1.7#GigabitEthernet8&1.3.6.1.2.1.31.1.1.1.11#GigabitEthernet8:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.7#GigabitEthernet6&1.3.6.1.2.1.31.1.1.1.11#GigabitEthernet6:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.7#GigabitEthernet6&1.3.6.1.2.1.31.1.1.1.11#GigabitEthernet6:public@s2:::::2 + + 1.3.6.1.2.1.31.1.1.1.7#GigabitEthernet9&1.3.6.1.2.1.31.1.1.1.11#GigabitEthernet9:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.7#GigabitEthernet8&1.3.6.1.2.1.31.1.1.1.11#GigabitEthernet8:public@s2:::::2 +Title[location-aggregate-00001-pkts]: *** CONFIG IDENTITY IN .env *** - Peering Packets / second on Location 1 +Options[location-aggregate-00001-pkts]: growright , pngdate +YLegend[location-aggregate-00001-pkts]: Packets / Second +MaxBytes[location-aggregate-00001-pkts]: 27578125 +Directory[location-aggregate-00001-pkts]: locations/001 + + +##################################################################################################################### +# +# location-aggregate-00001-errs +# + +Target[location-aggregate-00001-errs]: + 1.3.6.1.2.1.2.2.1.14#GigabitEthernet3&1.3.6.1.2.1.2.2.1.20#GigabitEthernet3:public@s1:::::2 + + 1.3.6.1.2.1.2.2.1.14#GigabitEthernet4&1.3.6.1.2.1.2.2.1.20#GigabitEthernet4:public@s1:::::2 + + 1.3.6.1.2.1.2.2.1.14#GigabitEthernet1&1.3.6.1.2.1.2.2.1.20#GigabitEthernet1:public@s2:::::2 + + 1.3.6.1.2.1.2.2.1.14#GigabitEthernet8&1.3.6.1.2.1.2.2.1.20#GigabitEthernet8:public@s1:::::2 + + 1.3.6.1.2.1.2.2.1.14#GigabitEthernet6&1.3.6.1.2.1.2.2.1.20#GigabitEthernet6:public@s1:::::2 + + 1.3.6.1.2.1.2.2.1.14#GigabitEthernet6&1.3.6.1.2.1.2.2.1.20#GigabitEthernet6:public@s2:::::2 + + 1.3.6.1.2.1.2.2.1.14#GigabitEthernet9&1.3.6.1.2.1.2.2.1.20#GigabitEthernet9:public@s1:::::2 + + 1.3.6.1.2.1.2.2.1.14#GigabitEthernet8&1.3.6.1.2.1.2.2.1.20#GigabitEthernet8:public@s2:::::2 +Title[location-aggregate-00001-errs]: *** CONFIG IDENTITY IN .env *** - Peering Errors / second on Location 1 +Options[location-aggregate-00001-errs]: growright , pngdate +YLegend[location-aggregate-00001-errs]: Errors / Second +MaxBytes[location-aggregate-00001-errs]: 27578125 +Directory[location-aggregate-00001-errs]: locations/001 + + +##################################################################################################################### +# +# location-aggregate-00001-discs +# + +Target[location-aggregate-00001-discs]: + 1.3.6.1.2.1.2.2.1.13#GigabitEthernet3&1.3.6.1.2.1.2.2.1.19#GigabitEthernet3:public@s1:::::2 + + 1.3.6.1.2.1.2.2.1.13#GigabitEthernet4&1.3.6.1.2.1.2.2.1.19#GigabitEthernet4:public@s1:::::2 + + 1.3.6.1.2.1.2.2.1.13#GigabitEthernet1&1.3.6.1.2.1.2.2.1.19#GigabitEthernet1:public@s2:::::2 + + 1.3.6.1.2.1.2.2.1.13#GigabitEthernet8&1.3.6.1.2.1.2.2.1.19#GigabitEthernet8:public@s1:::::2 + + 1.3.6.1.2.1.2.2.1.13#GigabitEthernet6&1.3.6.1.2.1.2.2.1.19#GigabitEthernet6:public@s1:::::2 + + 1.3.6.1.2.1.2.2.1.13#GigabitEthernet6&1.3.6.1.2.1.2.2.1.19#GigabitEthernet6:public@s2:::::2 + + 1.3.6.1.2.1.2.2.1.13#GigabitEthernet9&1.3.6.1.2.1.2.2.1.19#GigabitEthernet9:public@s1:::::2 + + 1.3.6.1.2.1.2.2.1.13#GigabitEthernet8&1.3.6.1.2.1.2.2.1.19#GigabitEthernet8:public@s2:::::2 +Title[location-aggregate-00001-discs]: *** CONFIG IDENTITY IN .env *** - Peering Discards / second on Location 1 +Options[location-aggregate-00001-discs]: growright , pngdate +YLegend[location-aggregate-00001-discs]: Discards / Second +MaxBytes[location-aggregate-00001-discs]: 27578125 +Directory[location-aggregate-00001-discs]: locations/001 + + +##################################################################################################################### +# +# location-aggregate-00001-bcasts +# + +Target[location-aggregate-00001-bcasts]: + 1.3.6.1.2.1.31.1.1.1.9#GigabitEthernet3&1.3.6.1.2.1.31.1.1.1.13#GigabitEthernet3:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.9#GigabitEthernet4&1.3.6.1.2.1.31.1.1.1.13#GigabitEthernet4:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.9#GigabitEthernet1&1.3.6.1.2.1.31.1.1.1.13#GigabitEthernet1:public@s2:::::2 + + 1.3.6.1.2.1.31.1.1.1.9#GigabitEthernet8&1.3.6.1.2.1.31.1.1.1.13#GigabitEthernet8:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.9#GigabitEthernet6&1.3.6.1.2.1.31.1.1.1.13#GigabitEthernet6:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.9#GigabitEthernet6&1.3.6.1.2.1.31.1.1.1.13#GigabitEthernet6:public@s2:::::2 + + 1.3.6.1.2.1.31.1.1.1.9#GigabitEthernet9&1.3.6.1.2.1.31.1.1.1.13#GigabitEthernet9:public@s1:::::2 + + 1.3.6.1.2.1.31.1.1.1.9#GigabitEthernet8&1.3.6.1.2.1.31.1.1.1.13#GigabitEthernet8:public@s2:::::2 +Title[location-aggregate-00001-bcasts]: *** CONFIG IDENTITY IN .env *** - Peering Broadcasts / second on Location 1 +Options[location-aggregate-00001-bcasts]: growright , pngdate +YLegend[location-aggregate-00001-bcasts]: Broadcasts / Second +MaxBytes[location-aggregate-00001-bcasts]: 27578125 +Directory[location-aggregate-00001-bcasts]: locations/001 + + + ##################################################################################################################### ##################################################################################################################### ##################################################################################################################### @@ -337,7 +463,7 @@ Directory[ixp001-bcasts]: ixp ### ### SWITCH AGGREGATE GRAPHS ### -### Source: /Users/barryo/dev/ixp-inex/resources/views/services/grapher/mrtg/switch-aggregates.foil.php +### Source: /Users/barryo/dev/ixpm-inex/resources/views/services/grapher/mrtg/switch-aggregates.foil.php ### ##################################################################################################################### ##################################################################################################################### @@ -617,7 +743,7 @@ Directory[switch-aggregate-00002-bcasts]: switches/002 ### ### MEMBER PORTS ### -### Source: /Users/barryo/dev/ixp-inex/resources/views/services/grapher/mrtg/member-ports.foil.php +### Source: /Users/barryo/dev/ixpm-inex/resources/views/services/grapher/mrtg/member-ports.foil.php ### ##################################################################################################################### ##################################################################################################################### @@ -628,7 +754,7 @@ Directory[switch-aggregate-00002-bcasts]: switches/002 ##################################################################################################################### ##################################################################################################################### ### -### MEMBER PORT: HEAnet (AS1213)### +### MEMBER PORT: HEAnet [AS1213]### @@ -1001,7 +1127,7 @@ Directory[aggregate-00002-bcasts]: members/2/00002 ##################################################################################################################### ##################################################################################################################### ### -### MEMBER PORT: PCH DNS (AS42)### +### MEMBER PORT: PCH DNS [AS42]### @@ -1145,7 +1271,7 @@ Directory[aggregate-00003-bcasts]: members/3/00003 ##################################################################################################################### ##################################################################################################################### ### -### MEMBER PORT: AS112 (AS112)### +### MEMBER PORT: AS112 [AS112]### @@ -1367,7 +1493,7 @@ Directory[aggregate-00004-bcasts]: members/4/00004 ##################################################################################################################### ##################################################################################################################### ### -### MEMBER PORT: Imagine (AS25441)### +### MEMBER PORT: Imagine [AS25441]### @@ -1599,7 +1725,7 @@ Directory[aggregate-00005-bcasts]: members/5/00005 ### ### Core Bundle Ports ### -### Source: /Users/barryo/dev/ixp-inex/resources/views/services/grapher/mrtg/core-bundles.foil.php +### Source: /Users/barryo/dev/ixpm-inex/resources/views/services/grapher/mrtg/core-bundles.foil.php ### ##################################################################################################################### ##################################################################################################################### @@ -2053,6 +2179,6 @@ Directory[cb-aggregate-00001-sideb-bcasts]: corebundles/00001 ### DO NOT EDIT THIS FILE - IT IS AUTOMATICALLY GENERATED ### -### Source: /Users/barryo/dev/ixp-inex/resources/views/services/grapher/mrtg/footer.foil.php -### Generated: 2019-11-04 16:49:53 -### Generation time: 0.017601 secs +### Source: /Users/barryo/dev/ixpm-inex/resources/views/services/grapher/mrtg/footer.foil.php +### Generated: 2021-09-20 10:16:18 +### Generation time: 0.041588 secs diff --git a/data/travis-ci/known-good/ci-services-grapher-smokeping-vlanid1-ipv4.conf b/data/ci/known-good/ci-services-grapher-smokeping-vlanid1-ipv4.conf similarity index 100% rename from data/travis-ci/known-good/ci-services-grapher-smokeping-vlanid1-ipv4.conf rename to data/ci/known-good/ci-services-grapher-smokeping-vlanid1-ipv4.conf diff --git a/data/travis-ci/known-good/ci-services-grapher-smokeping-vlanid1-ipv6.conf b/data/ci/known-good/ci-services-grapher-smokeping-vlanid1-ipv6.conf similarity index 100% rename from data/travis-ci/known-good/ci-services-grapher-smokeping-vlanid1-ipv6.conf rename to data/ci/known-good/ci-services-grapher-smokeping-vlanid1-ipv6.conf diff --git a/data/travis-ci/known-good/ci-services-grapher-smokeping-vlanid2-ipv4.conf b/data/ci/known-good/ci-services-grapher-smokeping-vlanid2-ipv4.conf similarity index 100% rename from data/travis-ci/known-good/ci-services-grapher-smokeping-vlanid2-ipv4.conf rename to data/ci/known-good/ci-services-grapher-smokeping-vlanid2-ipv4.conf diff --git a/data/travis-ci/known-good/ci-services-grapher-smokeping-vlanid2-ipv6.conf b/data/ci/known-good/ci-services-grapher-smokeping-vlanid2-ipv6.conf similarity index 100% rename from data/travis-ci/known-good/ci-services-grapher-smokeping-vlanid2-ipv6.conf rename to data/ci/known-good/ci-services-grapher-smokeping-vlanid2-ipv6.conf diff --git a/data/travis-ci/known-good/regenerate.sh b/data/ci/known-good/regenerate.sh similarity index 100% rename from data/travis-ci/known-good/regenerate.sh rename to data/ci/known-good/regenerate.sh diff --git a/data/travis-ci/phpunit.xml b/data/ci/phpunit.xml similarity index 100% rename from data/travis-ci/phpunit.xml rename to data/ci/phpunit.xml diff --git a/data/travis-ci/after_failure.sh b/data/travis-ci/after_failure.sh deleted file mode 100755 index a221fe1ca..000000000 --- a/data/travis-ci/after_failure.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2009 - 2019 Internet Neutral Exchange Association Company Limited By Guarantee. -# All Rights Reserved. -# -# This file is part of IXP Manager. -# -# IXP Manager is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the Free -# Software Foundation, version v2.0 of the License. -# -# IXP Manager is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GpNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License v2.0 -# along with IXP Manager. If not, see: -# -# http://www.gnu.org/licenses/gpl-2.0.html - -echo "=============================================================" -echo "Build failed :(" -echo "=============================================================" -echo -echo IXP Manager logs -echo "=============================================================" -echo -cat var/log/$(date +%Y)/$(date +%m)/$(date +%Y%m%d).log -echo -echo -echo "=============================================================" -echo PHP Built in server logs -echo "=============================================================" -echo -cat php-built-in.log - diff --git a/data/travis-ci/setup_tests.sh b/data/travis-ci/setup_tests.sh deleted file mode 100755 index 0ad6151a4..000000000 --- a/data/travis-ci/setup_tests.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -# Travis CI setup script for testing IXP Manager -# -# Copyright (C) 2014 - 2019 Internet Neutral Exchange Association Company Limited By Guarantee. -# Author: Barry O'Donovan -# -# License: http://www.gnu.org/licenses/gpl-2.0.html - -# let us know where we are in case anything goes wrong -pwd - -# install requirements -# sudo apt-get update >/dev/null -# sudo apt-get upgrade -#sudo apt-get install php-memcache php7.0-snmp php-pear -#phpenv config-add data/travis-ci/configs/ixp-php.ini - -echo cd /home/travis/build/inex/IXP-Manager -cd /home/travis/build/inex/IXP-Manager || exit -echo phpenv rehash -phpenv rehash - -echo cp .env.travisci .env -cp .env.travisci .env - -# Set up IXP Manager -sudo touch public/.htaccess - -echo composer install --no-interaction --prefer-dist --no-suggest -composer install --no-interaction --prefer-dist --no-suggest - - -echo php artisan dusk:chrome-driver -php artisan dusk:chrome-driver - -cat data/travis-ci/travis_ci_test_db.sql | mysql --default-character-set=utf8mb4 -h 127.0.0.1 -u travis myapp_test - - -echo google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost -google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost & - - -./artisan serve &>php-built-in.log & - diff --git a/phpunit.xml b/phpunit.xml index 10e831440..c39475e5a 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -9,8 +9,18 @@ processIsolation="false" stopOnFailure="false"> - - ./tests + + ./tests/Browser + + + ./tests/Docstore + ./tests/DocstoreCustomer + + + ./tests/IXP + ./tests/Services + ./tests/Tasks + ./tests/Utils diff --git a/tests/Services/Grapher/Backends/MrtgTest.php b/tests/Services/Grapher/Backends/MrtgTest.php index 8e8f3e046..ede5bb2e6 100644 --- a/tests/Services/Grapher/Backends/MrtgTest.php +++ b/tests/Services/Grapher/Backends/MrtgTest.php @@ -47,7 +47,7 @@ public function testMrtgConfigurationGeneration(): void $config = $grapher->generateConfiguration()[0]; - $knownGoodConf = file_get_contents( base_path() . "/data/travis-ci/known-good/ci-services-grapher-mrtg.conf" ); + $knownGoodConf = file_get_contents( base_path() . "/data/ci/known-good/ci-services-grapher-mrtg.conf" ); $this->assertFalse( $knownGoodConf === false, "Mrtg Conf generation - could not load known good file ci-services-grapher-mrtg.conf" ); diff --git a/tests/Services/Grapher/Backends/SmokepingTest.php b/tests/Services/Grapher/Backends/SmokepingTest.php index 80291d6d5..e97cf01d2 100644 --- a/tests/Services/Grapher/Backends/SmokepingTest.php +++ b/tests/Services/Grapher/Backends/SmokepingTest.php @@ -58,7 +58,7 @@ public function testSmokepingConfigurationGeneration(): void $config = $grapher->generateConfiguration( GrapherBackendContract::GENERATED_CONFIG_TYPE_MONOLITHIC, $options )[ 0 ]; - $knownGoodConf = file_get_contents( base_path() . "/data/travis-ci/known-good/ci-services-grapher-smokeping-vlanid{$vlanid}-{$proto}.conf" ); + $knownGoodConf = file_get_contents( base_path() . "/data/ci/known-good/ci-services-grapher-smokeping-vlanid{$vlanid}-{$proto}.conf" ); $this->assertFalse( $knownGoodConf === false, "Smokeping Conf generation - could not load known good file ci-services-grapher-smokeping-vlanid{$vlanid}-{$proto}.conf" ); // clean the configs to remove the comment lines which are irrelevant diff --git a/tests/Tasks/Router/GenerateConfigurationBird1AS112Test.php b/tests/Tasks/Router/GenerateConfigurationBird1AS112Test.php index 5196af086..ab5df8b2b 100644 --- a/tests/Tasks/Router/GenerateConfigurationBird1AS112Test.php +++ b/tests/Tasks/Router/GenerateConfigurationBird1AS112Test.php @@ -54,7 +54,7 @@ public function testAs112BirdConfigurationGeneration(): void $router = Router::whereHandle( $handle )->get()->first(); $conf = ( new RouterConfigurationGenerator( $router ) )->render(); - $knownGoodConf = file_get_contents( base_path() . "/data/travis-ci/known-good/ci-apiv4-{$handle}.conf" ); + $knownGoodConf = file_get_contents( base_path() . "/data/ci/known-good/ci-apiv4-{$handle}.conf" ); $this->assertFalse( $knownGoodConf === false, "AS112 Conf generation - could not load known good file ci-apiv4-{$handle}.conf" ); // clean the configs to remove the comment lines which are irrelevant diff --git a/tests/Tasks/Router/GenerateConfigurationBird1CollectorTest.php b/tests/Tasks/Router/GenerateConfigurationBird1CollectorTest.php index 136f068e0..cdabd3343 100644 --- a/tests/Tasks/Router/GenerateConfigurationBird1CollectorTest.php +++ b/tests/Tasks/Router/GenerateConfigurationBird1CollectorTest.php @@ -55,7 +55,7 @@ public function testRouteCollectorBirdConfigurationGeneration(): void $router = Router::whereHandle( $handle )->get()->first(); $conf = ( new RouterConfigurationGenerator( $router ) )->render(); - $knownGoodConf = file_get_contents( base_path() . "/data/travis-ci/known-good/ci-apiv4-{$handle}.conf" ); + $knownGoodConf = file_get_contents( base_path() . "/data/ci/known-good/ci-apiv4-{$handle}.conf" ); $this->assertFalse( $knownGoodConf === false, "RC Conf generation - could not load known good file ci-apiv4-{$handle}.conf" ); // clean the configs to remove the comment lines which are irrelevant diff --git a/tests/Tasks/Router/GenerateConfigurationBird1ServerTest.php b/tests/Tasks/Router/GenerateConfigurationBird1ServerTest.php index 0d974569c..d387ac62f 100644 --- a/tests/Tasks/Router/GenerateConfigurationBird1ServerTest.php +++ b/tests/Tasks/Router/GenerateConfigurationBird1ServerTest.php @@ -57,7 +57,7 @@ public function testRouteServerBirdConfigurationGeneration(): void $router = Router::whereHandle( $handle )->get()->first(); $conf = ( new RouterConfigurationGenerator( $router ) )->render(); - $knownGoodConf = file_get_contents( base_path() . "/data/travis-ci/known-good/ci-apiv4-{$handle}.conf" ); + $knownGoodConf = file_get_contents( base_path() . "/data/ci/known-good/ci-apiv4-{$handle}.conf" ); $this->assertFalse( $knownGoodConf === false, "RS Conf generation - could not load known good file ci-apiv4-{$handle}.conf" ); // clean the configs to remove the comment lines which are irrelevant diff --git a/tests/Tasks/Router/GenerateConfigurationBird2CollectorTest.php b/tests/Tasks/Router/GenerateConfigurationBird2CollectorTest.php index dba642eab..14df5496d 100644 --- a/tests/Tasks/Router/GenerateConfigurationBird2CollectorTest.php +++ b/tests/Tasks/Router/GenerateConfigurationBird2CollectorTest.php @@ -55,7 +55,7 @@ public function testRouteCollectorBirdConfigurationGeneration(): void $router = Router::whereHandle( $handle )->get()->first(); $conf = ( new RouterConfigurationGenerator( $router ) )->render(); - $knownGoodConf = file_get_contents( base_path() . "/data/travis-ci/known-good/ci-apiv4-{$handle}.conf" ); + $knownGoodConf = file_get_contents( base_path() . "/data/ci/known-good/ci-apiv4-{$handle}.conf" ); $this->assertFalse( $knownGoodConf === false, "RC Conf generation - could not load known good file ci-apiv4-{$handle}.conf" ); // clean the configs to remove the comment lines which are irrelevant diff --git a/tests/Tasks/Router/GenerateConfigurationBird2ServerTest.php b/tests/Tasks/Router/GenerateConfigurationBird2ServerTest.php index 22ffb258d..0927e568a 100644 --- a/tests/Tasks/Router/GenerateConfigurationBird2ServerTest.php +++ b/tests/Tasks/Router/GenerateConfigurationBird2ServerTest.php @@ -53,7 +53,7 @@ public function testRouteServerBirdConfigurationGeneration(): void $router = Router::whereHandle( $handle )->get()->first(); $conf = ( new RouterConfigurationGenerator( $router ) )->render(); - $knownGoodConf = file_get_contents( base_path() . "/data/travis-ci/known-good/ci-apiv4-{$handle}.conf" ); + $knownGoodConf = file_get_contents( base_path() . "/data/ci/known-good/ci-apiv4-{$handle}.conf" ); $this->assertFalse( $knownGoodConf === false, "RS Conf generation - could not load known good file ci-apiv4-{$handle}.conf" ); // clean the configs to remove the comment lines and white space which are irrelevant diff --git a/tests/Utils/IxfMemberExportTest.php b/tests/Utils/IxfMemberExportTest.php index 481805382..6f45859fb 100644 --- a/tests/Utils/IxfMemberExportTest.php +++ b/tests/Utils/IxfMemberExportTest.php @@ -53,7 +53,7 @@ public function testIxfMemberExportGeneration(): void $json = $exporter->get( $v, false, $auth, true ); $a = ( $auth ? '' : 'un' ) . 'auth'; - $knownGoodConf = file_get_contents( base_path() . "/data/travis-ci/known-good/api-v4-member-export-{$v}-{$a}.json" ); + $knownGoodConf = file_get_contents( base_path() . "/data/ci/known-good/api-v4-member-export-{$v}-{$a}.json" ); $this->assertFalse( $knownGoodConf === false, "IX-F Member Export - could not load known good file api-v4-member-export-{$v}-{$a}.json" ); // clean the exports to set timestamp the same