view · edit · sidebar · attach · print · history

< Niklaus.20170524-brand2csv | Index | Niklaus.20170522-vetoquinol-rack >>

20170523-vetoquinol-rack

Summary

  • Port vetoquinol to use the rack based SBSM
  • Fix errors in virbac.bbmb.ch
  • Port sandoz.bbmb.ch to use the rack based SBSM
  • Keep in Mind

Commits

Index

Port vetoquinol to use the rack based SBSM

Vetoquinol (and also virbac) have some old selenium tests, which were not run in a long time. Last commit is of September 2008. Investing some time to see, whether we can run the test cases with minimal changes. Looking whether we can use https://github.com/crguezl/rack-rspec. When testing '/' I must find a way on how to disable using the persistence layer. This should be possible by specifiying in the config file lib/bbmb/persistence/none.rb.

Created the following files under spec/etc

  • config.yml
  • polling.yml
  • ydim.yml

Added a spec/server_spec.rb which visites '/' and ensures that I get an HTML request code of 200. Needed a small fix in BBMB Don't require persistence/odba if config.persistence == none

Now converting the login_test.rb to spec/veotquinol/login_spec.rb.

Converting the helper functions by adding them to the spec/spec_helper.rb

  • get_title
  • is_text_present
  • is_element_present
  • get_attribute
  • get_text

Copied the manual_tests.md from virbac to adapt them to vetoquinol. Now I am able to login as admin and unter http://vetoquinol_rack.ngiger.ch/de/bbmb I see the customers. There are 3324 which does not match the 2260 from https://vetoquinol.bbmb.ch. There must be problem with my config. Do I use the correct ydim/yus ports?

Sorting as admin user the customers by Kundennr, Kunde, PLZ, Ort, Email, Aktiviert, Letztes Login works. Sorting by Letztes Login just takes quite some time. Searching a customer by name, PLZ, Ort, customer id works.

After generating a password and trying to display it, I get also in a loop. Fixing the java scripts.

Changing the password of a user works. Can logging with the new passwort. Sending a command says that it was sent, but I did not receive any mail. Is my E-Mail setup in the config wrong? Yes. Found suppress_sending: true in etc/config.yml. Sending an order with remarks did not work. Must patch the javascript files.

Debugging the importer by setting locally run_only_once_at_startup in lib/bbmb/util/server.rb. Getting the following error #<OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol>

Pushed commit in branch rack:

After correcting the etc/config.yml to use the same account as fastpower I get the following error e-mail

orders.vetoquinol@bbmb.ch

11:43 (vor 0 Minuten)

an mich
OpenSSL::SSL::SSLError
SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/net/pop.rb:553:in `connect'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/net/pop.rb:553:in `do_start'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/net/pop.rb:537:in `start'
/var/www/vetoquinol_rack.bbmb.ch/vendor/ruby/2.4.0/gems/mail-2.6.5/lib/mail/network/retriever_methods/pop3.rb:131:in `start'
/var/www/vetoquinol_rack.bbmb.ch/vendor/ruby/2.4.0/gems/mail-2.6.5/lib/mail/network/retriever_methods/pop3.rb:62:in `find'
/var/www/vetoquinol_rack.bbmb.ch/vendor/ruby/2.4.0/gems/mail-2.6.5/lib/mail/network/retriever_methods/base.rb:42:in `all'
/var/www/vetoquinol_rack.bbmb.ch/vendor/ruby/2.4.0/gems/mail-2.6.5/lib/mail/mail.rb:172:in `all'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:65:in `poll'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:144:in `block in poll_sources'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:137:in `block in load_sources'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/psych/deprecated.rb:32:in `each'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/psych/deprecated.rb:32:in `load_documents'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:136:in `load_sources'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:143:in `poll_sources'
/home/niklaus/git/bbmb/lib/bbmb/util/updater.rb:13:in `run'
/home/niklaus/git/bbmb/lib/bbmb/util/server.rb:41:in `update'
/home/niklaus/git/bbmb/lib/bbmb/util/server.rb:96:in `block (2 levels) in run_updater'
/home/niklaus/git/bbmb/lib/bbmb/util/server.rb:84:in `loop'
/home/niklaus/git/bbmb/lib/bbmb/util/server.rb:84:in `block in run_updater'

Sending an customer order works now and I found the e-mail in my inbox.

Pushed commit Use logging via SBSM for test/util/test_updater.rb to make travis-ci happy.

Added a pry statemen when sending. Uses the the same etc/polling.yml as on fastpower. Now I get the following error mail

TypeError
no implicit conversion of nil into String
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:1447:in `path'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:1447:in `block in fu_list'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:1447:in `map'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:1447:in `fu_list'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/fileutils.rb:186:in `mkdir_p'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:73:in `block in poll'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:67:in `each'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:67:in `poll'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:145:in `block in poll_sources'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:138:in `block in load_sources'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/psych/deprecated.rb:32:in `each'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/psych/deprecated.rb:32:in `load_documents'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:137:in `load_sources'
/home/niklaus/git/bbmb/lib/bbmb/util/polling_manager.rb:144:in `poll_sources'
/home/niklaus/git/bbmb/lib/bbmb/util/updater.rb:13:in `run'
/home/niklaus/git/bbmb/lib/bbmb/util/server.rb:41:in `update'
/home/niklaus/git/bbmb/lib/bbmb/util/server.rb:95:in `block (2 levels) in run_updater'
/home/niklaus/git/bbmb/lib/bbmb/util/server.rb:84:in `loop'
/home/niklaus/git/bbmb/lib/bbmb/util/server.rb:84:in `block in run_updater'

When running the updater a second time now mail is retrieved. But looking at the code it is clear, that the variable @backup_dir is nil.

Installing and adapting vetoquinol on fastpower

Continue manual testing.

  • Adding a file to the order does not work and gives NoMethodError at /de/bbmb undefined method `rewind' for {}:Hash in /home/niklaus/git/bbmb/lib/bbmb/util/transfer_dat.rb: in parse, line 10

Full stack trace is

NoMethodError: undefined method `rewind' for {}:Hash
        /home/niklaus/git/bbmb/lib/bbmb/util/transfer_dat.rb:10:in `parse'
        /home/niklaus/git/bbmb/lib/bbmb/html/state/viral/customer.rb:44:in `_transfer'
        /home/niklaus/git/bbmb/lib/bbmb/html/state/viral/customer.rb:114:in `order_transfer'
        /home/niklaus/git/sbsm/lib/sbsm/state.rb:197:in `_trigger'
        /home/niklaus/git/sbsm/lib/sbsm/state.rb:186:in `trigger'
        /home/niklaus/git/bbmb/lib/bbmb/html/state/global.rb:58:in `trigger'
        /home/niklaus/git/sbsm/lib/sbsm/viralstate.rb:38:in `trigger'
        /home/niklaus/git/sbsm/lib/sbsm/session.rb:218:in `block in process_rack'
        /home/niklaus/git/sbsm/lib/sbsm/session.rb:208:in `synchronize'
        /home/niklaus/git/sbsm/lib/sbsm/session.rb:208:in `process_rack'
        /home/niklaus/git/sbsm/lib/sbsm/app.rb:119:in `call'

Fixed with commits

Installed new BBMB version on fastpower and add the line server_port: 443 to the etc/config.yml

Fix errors in virbac.bbmb.ch

Bumped BBMB to 2.2.5 with commit Bumped version to 2.2.5

Adapted virbac to use the new BBMB with commit Use BBMB 2.2.5

Port sandoz.bbmb.ch to use the rack based SBSM

Started adapting apache config, sevice, Gemfile, config.ru etc.

view · edit · sidebar · attach · print · history
Page last modified on May 23, 2017, at 05:03 PM