[interchange] Full catalog installation test for Travis CI
Josh Lavin <[email protected]> Tue, 05 Jul 2016 21:58:39 +0000
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 3171509137ff7b40323bcf6e0e666e4e71dc440a Author: Josh Lavin <[email protected]> Date: Tue Jul 5 14:57:56 2016 -0700 Full catalog installation test for Travis CI .travis.yml | 14 ++++ MANIFEST.SKIP | 1 + t/interchange-test/interchange.cfg | 124 ++++++++++++++++++++++++++++++++++++ t/interchange-test/variable.txt | 108 +++++++++++++++++++++++++++++++ 4 files changed, 247 insertions(+), 0 deletions(-) --- diff --git a/.travis.yml b/.travis.yml index 6ce4aff..11b15b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ perl: - "5.20" - "5.22" sudo: false +services: + - mysql before_install: - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers - source ~/travis-perl-helpers/init @@ -18,7 +20,19 @@ before_install: - cd $BUILD_DIR install: - cpan-install --deps + - cpanm --notest --installdeps . + - cpanm --notest DBD::Pg DBD::mysql +before_script: + - mysql -e 'create database interchange_test;' script: - perl Makefile.PL force=1 PREFIX=/home/travis/interchange - make - perl test.pl + - make install + - mkdir /home/travis/catalogs + - cp -r /home/travis/interchange/strap /home/travis/catalogs/ + - mkdir /home/travis/catalogs/strap/logs + - cp -fv t/interchange-test/variable.txt /home/travis/catalogs/strap/products/ + - cp -fv t/interchange-test/interchange.cfg /home/travis/interchange/ + - cd /home/travis/interchange + - ./bin/restart diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index fce18b5..aa0ef74 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -68,6 +68,7 @@ _$ ^scripts/.*[a-z]$ ^scripts/initp.PL$ ^\.travis.yml$ +^t(/|$) ^win(/|$) ^windows(/|$) ^work(/|$) diff --git a/t/interchange-test/interchange.cfg b/t/interchange-test/interchange.cfg new file mode 100644 index 0000000..a6778c3 --- /dev/null +++ b/t/interchange-test/interchange.cfg @@ -0,0 +1,124 @@ +#========================================================================# + +# interchange.cfg + +#========================================================================# +# + +# Allows use of "ifdef @INDEV" below. Will set INDEV to 1 if file +# _indev is present. +Require module Vend::InDev + +# These settings all affect other configuration directives below. + +AutoVariable Windows LockType + +# Set to 1 to include back-end administration interface. +Variable UI 1 + +# Set to "low", "high", or "rpc" to get different server parameters. +Variable TRAFFIC low + +# Set to 1 to log extra debugging info and get a dump of global and +# catalog data structures. +#Variable DEBUG 1 + +#========================================================================# + +# Set up individual catalogs here. + +Catalog strap /home/travis/catalogs/strap /cgi-bin/strap + +#========================================================================# + +# Require an external module + +# This one tests the realtime payment gateway code, set INDEV variable to test. +# +ifdef @INDEV +Require module Vend::Payment::TestPayment +endif + +#========================================================================# + +Environment MOD_PERL + +# Prevent arbitrary [file ...] and [include ...] among other things. +NoAbsolute Yes + +#========================================================================# + +ifdef @DEBUG + +Message Sending debug messages to debug.log. +DebugFile debug.log + +# A few simple tests ... +GlobalSub sub test_global_sub { return 'Test of global subroutine OK.' } +Variable TEST_VARIABLE Test of global variable OK. + +# Dump global and catalog data structures to a text file at startup time. +# See {ConfDir}/interchange.structure and {CatRoot}/{CatName}.structure. +DumpStructure Yes + +# This logs DBI calls to your DebugFile. +# It's commented out by default because it generates a lot of messages. +#DataTrace 1 + +endif + +#========================================================================# + +ifdef TRAFFIC =~ /low/i +Message Low traffic settings. +HouseKeeping 3 +MaxServers 0 +PIDcheck 300 +endif + +ifdef TRAFFIC =~ /high/i +Message High traffic settings. +HouseKeeping 2 +MaxServers 0 +PIDcheck 120 +endif + +ifdef TRAFFIC =~ /rpc/i +Message RPC traffic settings. +PreFork Yes +StartServers 5 +MaxServers 0 +MaxRequestsPerChild 100 +HouseKeeping 2 +PIDcheck 120 +endif + +#========================================================================# + +# Set this so cookies are issued only for the current catalog, not for +# the whole base domain. +Mall Yes + +# Additional Safe operations to untrap beyond the standard "ftfile sort". +SafeUntrap rand + +TcpMap 7786 - + +# Include back office administration UI if variable set above. +ifdef UI +Message -i -n Calling UI... +include lib/UI/ui.cfg +endif + +## This is only needed if you use Net::SMTP instead of +## sendmail or clones +#Variable MV_SMTPHOST smtp + +# Include individual usertags. +include usertag/*.tag + +# Include the robot recognition lists +include robots.cfg + +# Include the list of country-specific standardised subdomains +include subdomains.cfg diff --git a/t/interchange-test/variable.txt b/t/interchange-test/variable.txt new file mode 100644 index 0000000..baf3867 --- /dev/null +++ b/t/interchange-test/variable.txt @@ -0,0 +1,108 @@ +code Variable pref_group +ADDRESS 123 Main St. Company +CART_UPSELL 0 Cart/Checkout +CGIWRAP __MVC_CGIWRAP__ Admin Control +CGI_DIR __MVC_CGIDIR__ Admin Control +CGI_URL __MVC_CGIURL__ Directories and Paths +CHECKOUT_MAIL 1 Cart/Checkout +CHECKOUT_MAIL_LIST 1 Cart/Checkout +CHECKOUT_PAGE ord/country Cart/Checkout +CHECK_ACCEPTED 1 Payment +CITY Anywhere, OH 45056 Company +COD_ACCEPTED 0 Payment +COMPANY __MVC_COMPANY__ Company +CREDIT_CARDS_ACCEPTED visa mc amex discover Payment +DECREMENT_INVENTORY 0 Order +DEFAULT_COUNTRY US Shipping +DEFAULT_LOCALE en_US Internationalization +DEFAULT_PAYMENT_MODE credit_card Payment +DOCROOT __MVC_DOCUMENTROOT__ Directories and Paths +EMAIL_INFO __MVC_MAILORDERTO__ Company +EMAIL_SERVICE __MVC_MAILORDERTO__ Company +ENCRYPTOR Encryption +ENTRY_CHECK_ACCEPTED 1 Payment +ENTRY_COD_ACCEPTED 0 Payment +ENTRY_CREDIT_CARDS_ACCEPTED visa mc amex discover Payment +ENTRY_POSTAL_ACCEPTED 0 Payment +ENTRY_PO_ACCEPTED 1 Payment +FAX (765) 555-9999 Company +GIFT_CERT_PERIOD 1 year Payment +GOOGLE_ANL_ID Google +IC_DIR __MVC_VENDROOT__ Admin Control +IMAGE_DIR __MVC_IMAGEURL__ Directories and Paths +LINKHOST Admin Control +LINKMODE Admin Control +LINKPORT Admin Control +LOCALES Internationalization +LOGDIR logs Admin Control +LOGO logo.png Template +MAILING_FROM __MVC_COMPANY__ <__MVC_MAILORDERTO__> Mailings +MAILING_MAX_DIRECT 50 Mailings +MAILING_TO {FNAME} {LNAME} <{EMAIL}> Mailings +MV_DEFAULT_SEARCH_DB 1 Database +MV_DEMO_MODE 1 General +MV_PAYMENT_HOST Payment +MV_PAYMENT_ID a_fake_id Payment +MV_PAYMENT_MODE testpayment Payment +MV_PAYMENT_PARTNER Payment +MV_PAYMENT_REFERER Payment +MV_PAYMENT_SECRET Payment +MV_PAYMENT_VENDOR Payment +MYSQL 1 Database +ORDERS_TO __MVC_MAILORDERTO__ Order +ORDER_ROUTES log main copy_user Order +PASSWORD_RESET_CHECK_KEY ChAnGeMe General +PGP_KEY Encryption +PGSQL Database +PHONE (765) 555-1212 Company +POSTAL_ACCEPTED 0 Payment +PO_ACCEPTED 1 Payment +PUBLISH_DO_RCS 0 Admin Control +PUBLISH_NO_PAGE_ROOT 0 Admin Control +PUBLISH_PUT_IMAGES images Admin Control +PUBLISH_PUT_PAGES pages Admin Control +PUBLISH_QUIT_ON_RCS_ERROR 0 Admin Control +RUNDIR run Admin Control +SAMPLEHTML __MVC_SAMPLEHTML__ Directories and Paths +SAMPLEURL __MVC_SAMPLEURL__ Directories and Paths +SECURE_ENABLE 0 General +SECURE_SERVER http://__MVC_SERVERNAME__ Directories and Paths +SERVER_NAME __MVC_SERVERNAME__ Directories and Paths +SETTLE_TRANSACTION Payment +SHIP_DEFAULT_COUNTRY US Shipping +SHIP_DEFAULT_MODE free_or_upsg Shipping +SHIP_FLAT_DOM_RATE 5 Shipping +SHIP_FLAT_INTL_RATE 10 Shipping +SQLDSN dbi:mysql:interchange_test Database +SQLITE Database +SQLPASS Database +SQLUSER travis Database +TAXAREA IN Tax +TAXFIELD state Tax +TAXRATE IN=6.0 Tax +TAXSHIPPING Tax +TOLLFREE (888) 555-1212 Company +UI_ABOUT_LOGIN_URL http://www.icdevgroup.org/ Admin Control +UI_ABOUT_NORMAL_URL http://www.icdevgroup.org/ Admin Control +UI_ADMIN_TABLES 2ndDayAir 2ndDayAirAM 3DaySelect access Accessorials air_pp Book dict Expedited Express Ground ichelp locale mv_metadata NextDayAir NextDayAirSaver Priority pay_cert_lock pay_cert_redeem surf_pp ups_cache usps variable Xarea Zone Admin Control +UI_BOTTOMIMG poweredby.gif Admin Control +UI_CLONE_TABLES products* pricing* inventory merchandising options:sku Item display +UI_COMPONENT_DIR templates/components Directories and Paths +UI_HELP_HEIGHT 480 Admin Control +UI_HELP_WIDTH 650 Admin Control +UI_IMAGE_DIR __MVC_SHAREURL__/interchange-5/ Admin Control +UI_IMAGE_DIR_SECURE __MVC_SHAREURL__/interchange-5/ Admin Control +UI_ITEM_TABLES products pricing inventory merchandising options:sku Item display +UI_LOCALE en_US Admin Control +UI_META_LINK 1 Admin Control +UI_ORDER_VIEWNEXT_MAX_SKIP 20 Admin Control +UI_PAGE_DIR pages Directories and Paths +UI_SECURE Admin Control +UI_TEMPLATE_DIR templates Directories and Paths +UI_TRAFFIC_STATS Directories and Paths +UI_USER_MERGE_TABLES Admin Control +UI_WIDGET_TYPES Admin Control +UPS_COUNTRY_FIELD country Shipping +UPS_ORIGIN 45056 Shipping +UPS_POSTCODE_FIELD zip Shipping +WWW_DIR /__MVC_CATALOGNAME__ Directories and Paths