Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdickey/b8065ae63f19c87939d13f3b22e40b72 to your computer and use it in GitHub Desktop.
Save jdickey/b8065ae63f19c87939d13f3b22e40b72 to your computer and use it in GitHub Desktop.
FIXED: Capybara+Selenium+Docker(+DatabaseCleaner) led to abject confusion

We fixed the problem, in a highly unexpected way. Below is the text (excluding static-analysis report boilerplate) of the commit we've just pushed to our project repo. Thanks for the helpful comments from all, particularly /u/nyekks on Reddit.

Fix the Selenium prob that wasn't a Selenium prob

It's been a long road, getting from there to here...

We'd been chasing our tail for days, never mind how many, trying to figure out why our Selenium JavaScript tests were apparently breaking Docker. Eventually, we posted pleas for help on Reddit, StackOverFlow, and Gitter; all variations of (and referencing) this Gist.

Turns out the problem wasn't (wholly) with Selenium, Capybara, Docker, and/or the interaction between the three. @mitpaladin eventually discovered a randomisation seed (15474) that, when specified via a TESTOPTS environment variable passed to Rake in scripts/run_tests.sh, would yield a green bar. That was Interesting, but not necessarily directly Useful; by proving that there was at least a 1 in ()(2**333) - 1) chance of a green bar, the tests themselves weren't irreparably breaking anything. (Your chances, however, are far better with your local lottery.) As we both engaged in further online research, @mitpaladin again came through, finding multiple StackOverflow answers like this one that pointed the (middle) finger directly at...DatabaseCleaner of all things. To be fair, their README lightly touches on the problem but, if you don't already know that's what you're looking for, you probably aren't going to think twice about it even if you read it.

Changing the DatabaseCleaner.strategy from :transaction to :deletion allowed everything to work; after making the change, we were immediately rewarded with a green bar. (There is a DB_CLEANER_STRATEGY constant defined in spec/spec_helper.rb, however, Just In Case we ever need to change it again.)

Now maybe we can get our heads back on and figure out what we were trying to accomplish after this newly-passing feature spec lo! these many days ago.



Original plea for help below.


We've been stumped trying to figure out how to get Selenium JavaScript testing working with our Dockerised Ruby (Hanami) app. For spec examples that don't depend on JavaScript, of course, the Capybara-default Rack::Test driver is adequate, but every modern app depends on JavaScript for one thing or another, and ours is/will be no different.

To summarise:

  1. We can run JavaScript-using feature specs successfully if no non-JS specs are run in the same rake invocation. (We use jbodah/minitest-tagz to filter spec invocations);
  2. When running our full set of specs, Firefox Marionette hangs when running a JavaScript-enabled example, with its log message indicating that it does not have the IP address it should be connecting to.

We've only found a very limited set of tutorials/walkthroughs that are obviously applicable, mostly quite long in the tooth by 2018. The two that we've cargo-culted most blatantly are

  1. Integration testing with dockerized Selenium and Capybara, by Ahmet Kizilay in February 2016; and
  2. Dockerized Rails Capybara tests on top of Selenium, by Alfredo Motta in May, 2016.

It's probable, or at least likely, that we've consistently misread or glossed over something in these that is biting us now. It's also worth noting that Docker internals, particularly related to networking, seem to have evolved significantly in the last two years, and that may have something to do with our problem.

The following files are included in this Gist:

  1. 00-Capybara-Selenium-Docker-confusion__readme.md: this problem statement;
  2. 01-docker-compose.yml: the docker-compose.yml file for the application;
  3. 02-run_tests.sh: the scripts/run_tests.sh file which serves as the command run by the web container as specified in the docker-compose file;
  4. 03-features_helper.rb: the `spec/features_helper' required by each feature spec; primarily concerned with Selenium setup;
  5. 04-Dockerfile: the Dockerfile used to build the web container;
  6. 05-join_as_member_spec.rb: one of the feature specs which exercises JavaScript in the application;
  7. 06-focused_logfile.log: the terminal output from running docker-compose up --exit-code-from web with only JavaScript-exercising spec examples being run;
  8. 07-unfocused_logfile.log: the terminal output from running the same docker-compose invocation with all examples in all specs enabled (i.e., not limited through the use of tag :focus).

Any helpful comments and/or pointers to existing working test setups (regardless of framework being used, e.g., Rails) would be greatly appreciated. Thanks.

version: '2.3'
services:
firefox:
image: selenium/standalone-firefox-debug:3.14.0
container_name: browser
volumes:
- "/dev/shm:/dev/shm"
ports:
- "4444:4444"
db:
image: postgres:10
user: postgres
mem_limit: 192m
volumes:
- conv-pg-data:/var/lib/postgresql/data
ports:
- "5432:5432"
web:
build: .
image: jdickey/conversagence:dev-14-20181012
command: /bin/bash -l scripts/run_tests.sh
mem_limit: 256m
environment:
- LANG=en_GB.UTF-8
- LC_ALL=en_GB.UTF-8
- DOCKERISED=true
- RUBYOPT=-Ispec\ -W0
- ROWS=50
- COLUMNS=250
volumes:
- .:/app
ports:
- "80:2300"
depends_on:
- db
- firefox
volumes:
conv-pg-data:
#!/bin/bash
export LOCAL_IP="$(ip a show eth0 | grep inet | awk '{ print $2 }' | cut -d '/' -f 1)"
export SELENIUM_URL=http://browser:4444
export HANAMI_ENV=test
# ping -c 3 browser
echo "LOCAL_IP=$LOCAL_IP"
echo "SELENIUM_URL=$SELENIUM_URL"
bin/rake
# frozen_string_literal: true
# Require this file for feature tests
require_relative './spec_helper'
require 'capybara/minitest'
require 'capybara/minitest/spec'
require 'selenium/webdriver'
Capybara.register_driver :docker_firefox do |app|
dcap__ = Selenium::WebDriver::Remote::Capabilities.firefox
Capybara::Selenium::Driver.new(app,
browser: :remote,
url: "#{ENV['SELENIUM_URL']}/wd/hub",
desired_capabilities: dcap__)
end
def setup_driver
return if ENV['SELENIUM_URL'].nil? || ENV['SELENIUM_URL'].empty?
Capybara.current_driver = :docker_firefox
Capybara.javascript_driver = :docker_firefox
Capybara.server_port = 55_555
Capybara.server_host = (ENV['LOCAL_IP']).to_s
Capybara.app_host = "http://#{ENV['LOCAL_IP']}:#{Capybara.server_port}"
end
Capybara.app = Hanami.app
module MiniTest
class Spec
include Capybara::DSL
include Capybara::Minitest::Expectations
def teardown
Capybara.reset_sessions!
Capybara.use_default_driver
end
end
end
FROM jdickey/conversagence-base:alpine
ENV APP_HOME /app
RUN mkdir -p $APP_HOME/bin
WORKDIR $APP_HOME
COPY Gemfile $APP_HOME
RUN bundle install --binstubs --local
ADD . $APP_HOME
CMD bin/hanami server --host=0.0.0.0
# frozen_string_literal: true
require_relative '../../features_helper'
describe 'Join as a New Member' do
ROOT_PATH = '/'
after do
UserRepository.new.clear
end
tag :focus
describe 'when no Member is logged in', js: true do
let(:member_email) { 'john.doe@example.com' }
let(:member_name) { 'John Doe' }
let(:member_profile) { 'This is *some* profile content.' }
before do
# skip 'Go away'
setup_driver
# page.driver.browser.manage.window.resize_to(1920, 1080)
end
after do
Capybara.reset_sessions!
Capybara.use_default_driver
end
it 'clicking the Sign Up button navigates to the "Join As Member" path' do
visit Web.routes.root_path
find('#sign-up-button').click
expect(page.current_path).must_equal Web.routes.new_join_as_member_path
end
it 'can submit the registration form' do
visit Web.routes.new_join_as_member_path
expect(page.has_content?('401 - Unauthorized')).must_equal false
within 'form#user-form' do
fill_in 'user-name', with: member_name
fill_in 'user-email', with: member_email
fill_in 'user-profile', with: member_profile
click_button 'Submit Membership'
end # within 'form#user-form'
expect(current_path).must_equal ROOT_PATH
text = "Member '#{member_name}' successfully registered. Check your " \
"email at #{member_email}."
message = find '.segment > .flash-messages > .info'
expect(message.text).must_equal text
end
end # describe 'when no Member is logged in'
describe 'when a Member is presently logged in' do
it 'should be filled in later' do
skip 'FIXME: Member login not yet implemented at feature level.'
end
end # describe 'when a Member is presently logged in'
end
using --exit-code-from implies --abort-on-container-exit
Creating network "conversagence_default" with the default driver
Building web
Step 1/8 : FROM jdickey/conversagence-base:alpine
---> f48397b9f0a5
Step 2/8 : ENV APP_HOME /app
---> Running in 9f48e4dbed07
Removing intermediate container 9f48e4dbed07
---> 68d9749d6d7e
Step 3/8 : RUN mkdir -p $APP_HOME/bin
---> Running in cc57d0354b2b
Removing intermediate container cc57d0354b2b
---> f102445dec63
Step 4/8 : WORKDIR $APP_HOME
---> Running in 0ecd8f594f46
Removing intermediate container 0ecd8f594f46
---> fec68b1187dd
Step 5/8 : COPY Gemfile $APP_HOME
---> eb855237b6fb
Step 6/8 : RUN bundle install --binstubs --local
---> Running in f5cc6190ac3c
Resolving dependencies...
Using rake 12.3.1
Using public_suffix 3.0.3
Using addressable 2.5.2
Using ansi 1.5.0
Using ast 2.4.0
Using awesome_print 1.8.0
Using thread_safe 0.3.6
Using descendants_tracker 0.0.4
Using ice_nine 0.11.2
Using axiom-types 0.1.1
Using bcrypt 3.1.12
Using builder 3.2.3
Using bundler 1.16.6
Using byebug 10.0.2
Using mini_mime 1.0.1
Using mini_portile2 2.3.0
Using nokogiri 1.8.5
Using rack 2.0.5
Using rack-test 1.1.0
Using xpath 3.1.0
Using capybara 3.9.0
Using ffi 1.9.25
Using childprocess 0.9.0
Using coercible 1.0.0
Using equalizer 0.0.11
Using virtus 1.0.5
Using codeclimate-engine-rb 0.4.1
Using coderay 1.1.2
Using concurrent-ruby 1.0.5
Using database_cleaner 1.7.0
Using docile 1.3.1
Using dotenv 2.5.0
Using dry-configurable 0.7.0
Using dry-container 0.6.0
Using dry-core 0.4.7
Using dry-equalizer 0.2.1
Using dry-initializer 1.4.1
Using dry-logic 0.4.2
Using dry-monads 1.0.1
Using inflecto 0.0.2
Using dry-types 0.11.1
Using dry-struct 0.3.1
Using dry-validation 0.11.0
Using netaddr 2.0.3
Using unf_ext 0.0.7.5
Using unf 0.1.4
Using simpleidn 0.1.1
Using email_address 0.1.11
Using erubis 2.7.0
Using fabrication 2.20.1
Using ffaker 2.10.0
Using path_expander 1.0.3
Using sexp_processor 4.11.0
Using ruby_parser 3.11.0
Using flay 2.12.0
Using flog 4.6.2
Using transproc 1.0.2
Using hanami-utils 1.2.0
Using hanami-helpers 1.2.2
Using tilt 2.0.8
Using hanami-assets 1.2.0
Using hanami-cli 0.2.0
Using hanami-controller 1.2.0
Using mail 2.7.0
Using hanami-mailer 1.2.0
Using url_mount 0.2.1
Using http_router 0.11.2
Using hanami-router 1.2.0
Using hanami-validations 1.2.2
Using hanami-view 1.2.0
Using hanami 1.2.0
Using hanami-fabrication 0.1.0
Using rom-mapper 0.5.1
Using rom 3.3.3
Using rom-repository 1.4.0
Using sequel 4.49.0
Using rom-sql 1.3.5
Using hanami-model 1.2.0
Using jaro_winkler 1.5.1
Using json 2.1.0
Using kwalify 0.7.2
Using method_source 0.9.0
Using minitest 5.11.3
Using minitest-hooks 1.5.0
Using minitest-matchers 1.4.1
Using ruby-progressbar 1.10.0
Using minitest-reporters 1.3.5
Using minitest-tagz 1.6.0
Using parallel 1.12.1
Using parser 2.5.1.2
Using pg 1.1.3
Using powerpack 0.1.2
Using pry 0.11.3
Using pry-byebug 3.6.0
Using yard 0.9.16
Using pry-doc 0.13.4
Using puma 3.12.0
Using rainbow 3.0.0
Using rb-fsevent 0.10.3
Using rb-inotify 0.9.10
Using reek 5.1.0
Using unicode-display_width 1.4.0
Using rubocop 0.59.2
Using rubyzip 1.2.2
Using sass-listen 4.0.0
Using sass 3.6.0
Using selenium-webdriver 3.14.1
Using shotgun 0.9.2
Using simplecov-html 0.10.2
Using simplecov 0.16.1
Using strong_password 0.0.6
Using tachiban 0.6.0
Using timerizer 0.3.0
Bundle complete! 31 Gemfile dependencies, 113 gems now installed.
Bundled gems are installed into `/usr/local/bundle`
Removing intermediate container f5cc6190ac3c
---> 92188dcc6237
Step 7/8 : ADD . $APP_HOME
---> e2802c1802f0
Step 8/8 : CMD bin/hanami server --host=0.0.0.0
---> Running in 488866b789ef
Removing intermediate container 488866b789ef
---> 75e7e87d71a6
Successfully built 75e7e87d71a6
Successfully tagged jdickey/conversagence:dev-14-20181012
Image for service web was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating conversagence_db_1 ...
Creating browser ...
browser | 2018-10-12 06:00:01,473 WARN Included extra file "/etc/supervisor/conf.d/selenium-debug.conf" during parsing
browser | 2018-10-12 06:00:01,473 WARN Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
db_1 | 2018-10-12 06:00:01.323 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2018-10-12 06:00:01.323 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2018-10-12 06:00:01.329 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2018-10-12 06:00:01.342 UTC [13] LOG: database system was shut down at 2018-10-12 05:29:59 UTC
web_1 | LOCAL_IP=172.26.0.4
web_1 | SELENIUM_URL=http://browser:4444
browser | 2018-10-12 06:00:01,475 INFO supervisord started with pid 6
db_1 | 2018-10-12 06:00:01.349 UTC [1] LOG: database system is ready to accept connections
browser | 2018-10-12 06:00:02,478 INFO spawned: 'xvfb' with pid 9
browser | 2018-10-12 06:00:02,480 INFO spawned: 'fluxbox' with pid 10
browser | 2018-10-12 06:00:02,482 INFO spawned: 'vnc' with pid 11
browser | 2018-10-12 06:00:02,494 INFO spawned: 'selenium-standalone' with pid 15
browser | 2018-10-12 06:00:02,591 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
browser | 2018-10-12 06:00:02,591 INFO success: fluxbox entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
browser | 2018-10-12 06:00:02,591 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
browser | 2018-10-12 06:00:02,591 INFO success: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
browser | 06:00:03.609 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.14.0', revision: 'aacccce0'
browser | 06:00:03.622 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444
browser | 2018-10-12 06:00:03.848:INFO::main: Logging initialized @1302ms to org.seleniumhq.jetty9.util.log.StdErrLog
browser | 06:00:04.209 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
browser | 06:00:08.074 INFO [ActiveSessionFactory.apply] - Capabilities are: {
browser | "browserName": "firefox",
browser | "cssSelectorsEnabled": true,
browser | "javascriptEnabled": true,
browser | "nativeEvents": false,
browser | "rotatable": false,
browser | "takesScreenshot": true,
browser | "version": ""
browser | }
browser | 06:00:08.080 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
browser | 1539324008526 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.pX6x3HG9tr4s"
browser | 1539324010137 Marionette INFO Listening on port 44743
browser | 1539324010185 Marionette DEBUG [2147483649] Frame script loaded
browser | 1539324010188 Marionette DEBUG [2147483649] Frame script registered
browser | 06:00:10.229 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
browser | 06:00:10.292 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session e0aceb85-1d41-42e6-b4a2-198d87bcdd85 (org.openqa.selenium.firefox.GeckoDriverService)
browser | 1539324010383 Marionette DEBUG [2147483649] Received DOM event beforeunload for about:blank
browser | 1539324010446 Marionette DEBUG [2147483649] Received DOM event pagehide for about:blank
browser | 1539324017008 Marionette DEBUG [2147483649] Received DOM event DOMContentLoaded for http://172.26.0.4:55555/
browser | 1539324017821 Marionette DEBUG [2147483649] Received DOM event pageshow for http://172.26.0.4:55555/
browser | 1539324017920 Marionette DEBUG [2147483649] Received DOM event beforeunload for http://172.26.0.4:55555/
browser | 1539324017946 Marionette DEBUG [2147483649] Received DOM event pagehide for http://172.26.0.4:55555/
browser | 1539324017947 Marionette DEBUG [2147483649] Received DOM event unload for http://172.26.0.4:55555/
browser | 1539324018164 Marionette DEBUG [2147483649] Received DOM event DOMContentLoaded for http://172.26.0.4:55555/join_as_member/new
browser | 1539324018174 Marionette DEBUG [2147483649] Received DOM event pageshow for http://172.26.0.4:55555/join_as_member/new
browser | 1539324018302 Marionette DEBUG [2147483649] Received DOM event beforeunload for http://172.26.0.4:55555/join_as_member/new
browser | 1539324018305 Marionette DEBUG [2147483649] Received DOM event pagehide for http://172.26.0.4:55555/join_as_member/new
browser | 1539324018309 Marionette DEBUG [2147483649] Received DOM event DOMContentLoaded for about:blank
browser | 1539324018326 Marionette DEBUG [2147483649] Received DOM event pageshow for about:blank
web_1 | Run options: --seed 20563
web_1 |
web_1 | # Running:
web_1 |
web_1 | Capybara starting Puma...
web_1 | * Version 3.12.0 , codename: Llamas in Pajamas
web_1 | * Min threads: 0, max threads: 4
web_1 | * Listening on tcp://172.26.0.4:55555
browser | 1539324018379 Marionette DEBUG [2147483649] Received DOM event beforeunload for about:blank
browser | 1539324018407 Marionette DEBUG [2147483649] Received DOM event pagehide for about:blank
browser | 1539324018617 Marionette DEBUG [2147483649] Received DOM event DOMContentLoaded for http://172.26.0.4:55555/join_as_member/new
browser | 1539324018623 Marionette DEBUG [2147483649] Received DOM event pageshow for http://172.26.0.4:55555/join_as_member/new
browser | 1539324021278 Marionette DEBUG [2147483649] Received DOM event beforeunload for http://172.26.0.4:55555/join_as_member/new
browser | 1539324022573 Marionette DEBUG [2147483649] Received DOM event pagehide for http://172.26.0.4:55555/join_as_member/new
browser | 1539324022573 Marionette DEBUG [2147483649] Received DOM event unload for http://172.26.0.4:55555/join_as_member/new
browser | 1539324022798 Marionette DEBUG [2147483649] Received DOM event DOMContentLoaded for http://172.26.0.4:55555/
browser | 1539324022807 Marionette DEBUG [2147483649] Received DOM event pageshow for http://172.26.0.4:55555/
browser | 1539324022995 Marionette DEBUG [2147483649] Received DOM event beforeunload for http://172.26.0.4:55555/
browser | 1539324022997 Marionette DEBUG [2147483649] Received DOM event pagehide for http://172.26.0.4:55555/
browser | 1539324022998 Marionette DEBUG [2147483649] Received DOM event unload for http://172.26.0.4:55555/
browser | 1539324023005 Marionette DEBUG [2147483649] Received DOM event DOMContentLoaded for about:blank
browser | 1539324023019 Marionette DEBUG [2147483649] Received DOM event pageshow for about:blank
browser | 1539324023065 Marionette INFO Stopped listening on port 44743
browser | [Parent 64, Gecko_IOThread] WARNING: pipe error (60): Connection reset by peer: file /builds/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 353
browser | 06:00:23.575 INFO [ActiveSessions$1.onStop] - Removing session e0aceb85-1d41-42e6-b4a2-198d87bcdd85 (org.openqa.selenium.firefox.GeckoDriverService)
web_1 | ..
web_1 |
web_1 | Finished in 15.751715s, 0.1270 runs/s, 0.2539 assertions/s.
web_1 |
web_1 | 2 runs, 4 assertions, 0 failures, 0 errors, 0 skips
web_1 | Coverage report generated for RSpec to /app/tmp/coverage. 1659 / 2592 LOC (64.0%) covered.
web_1 | 597.2: flog total
web_1 | 4.2: flog/method average
web_1 |
web_1 | 8.8: ArticleRepository#find_by_author lib/conversagence/repositories/article_repository.rb:24-27
web_1 | 8.3: Web::Controllers::Shared::PasswordNew#find_user_by_token apps/web/controllers/shared/password_new.rb:13-17
web_1 | 8.2: PersistUpdatedPassword#validate_user_id lib/conversagence/interactors/persist_updated_password.rb:44-48
web_1 | 8.2: Web::Controllers::Shared::PasswordNew#validate_incoming_token apps/web/controllers/shared/password_new.rb:19-20
web_1 | 7.9: ChangeUserPassword#update_user_record lib/conversagence/interactors/change_user_password.rb:53-58
web_1 | 7.9: PersistUpdatedPassword#call lib/conversagence/interactors/persist_updated_password.rb:15-17
web_1 | 7.9: User#guest? lib/conversagence/entities/user.rb:8-10
web_1 | 7.5: PersistUpdatedPassword#password_string_present? lib/conversagence/interactors/persist_updated_password.rb:28-29
web_1 | 7.5: Web::Authentication::included apps/web/controllers/authentication.rb:7-11
web_1 | 7.4: UserRepository#find_by_email lib/conversagence/repositories/user_repository.rb:45-50
web_1 | 7.3: InitPasswordRequest#call lib/conversagence/interactors/init_password_request.rb:13-16
web_1 | 7.3: Mailers::PasswordReset#reset_token_from_user lib/conversagence/mailers/password_reset.rb:41-43
web_1 | 7.3: Web::RequireGuest::included apps/web/controllers/require_guest.rb:5-8
web_1 | 7.3: Web::Controllers::Shared::PasswordNew#validate_user apps/web/controllers/shared/password_new.rb:23-26
web_1 | 7.0: VerifyPasswordParams#validate_passwords lib/conversagence/interactors/verify_password_params.rb:28-31
web_1 | 6.8: UserRepository::FindUserByToken#find_by_token lib/conversagence/repositories/user_repository.rb:22-23
web_1 | 6.5: Web::Views::PasswordFormCommon#_display_error_block apps/web/views/password_form_common.rb:39-42
web_1 | 6.5: InitPasswordRequest#update_user lib/conversagence/interactors/init_password_request.rb:37-39
web_1 | 6.5: ValidateUserToken#report_expired_token lib/conversagence/interactors/validate_user_token.rb:23-28
web_1 | 6.3: InitPasswordRequest#send_mail_to lib/conversagence/interactors/init_password_request.rb:31-34
web_1 | 6.2: Web::Application::configure#production apps/web/application.rb:311-340
web_1 | 6.2: Web::Controllers::PasswordResetRequest::Create#redirect_with_flash apps/web/controllers/password_reset_request/create.rb:32-35
web_1 | 6.1: ChangeUserPassword#verify_password_params lib/conversagence/interactors/change_user_password.rb:61-65
web_1 | 6.1: Web::Controllers::JoinAsMember::Create#call apps/web/controllers/join_as_member/create.rb:13-17
web_1 | 6.1: Article#date_as_str_for lib/conversagence/entities/article.rb:25-27
web_1 | 6.1: Web::Views::Home::Index::TagButtons#single_tag_data apps/web/views/home/index/tag_buttons.rb:42-44
web_1 | 6.1: Web::Views::Home::Index::ArticleMenuItem#initialize apps/web/views/home/index/top_menu/article_menu_item.rb:12-16
web_1 | 6.1: InitPasswordRequest#find_user lib/conversagence/interactors/init_password_request.rb:23-28
web_1 | 6.0: NewMemberParams::required#email apps/web/controllers/shared/new_member_params.rb:17-17
web_1 | 5.9: Web::Views::PasswordFormCommon#display_errors apps/web/views/password_form_common.rb:16-19
web_1 | 5.9: Web::Controllers::Shared::PasswordCreate#call apps/web/controllers/shared/password_create.rb:5-7
web_1 | 5.8: Web::Views::Home::Index::TopMenu::MemberStatusMenu#render_button apps/web/views/home/index/top_menu/member_status_menu.rb:31-33
web_1 | 5.7: Web::Authentication#current_user apps/web/controllers/authentication.rb:24-27
web_1 | 5.7: ValidateUserToken#valid? lib/conversagence/interactors/validate_user_token.rb:44-50
web_1 | 5.6: PasswordResetParams::required#email apps/web/controllers/shared/password_reset_params.rb:12-12
web_1 | 5.6: Web::Views::Home::Index::TopMenu::MemberStatusMenu::Config#call apps/web/views/home/index/top_menu/member_status_menu/config.rb:14-16
web_1 | 5.6: Web::Controllers::JoinAsMember::Create#repo_fields apps/web/controllers/join_as_member/create.rb:32-33
web_1 | 5.5: Web::Controllers::Shared::PasswordCreate#report_result apps/web/controllers/shared/password_create.rb:21-24
web_1 | 5.4: Web::Controllers::PasswordResetRequest::Create#action_successful? apps/web/controllers/password_reset_request/create.rb:28-29
web_1 | 5.4: Web::Views::Home::Index::TopMenu::MemberStatusMenu#build_menu apps/web/views/home/index/top_menu/member_status_menu.rb:24-27
web_1 | 5.4: Web::Views::Home::Index#top_menu apps/web/views/home/index/top_menu.rb:10-11
web_1 | 5.4: Web::Views::PasswordFormCommon#common_passwords_list_link apps/web/views/password_form_common.rb:12-13
web_1 | 5.4: Web::Views::PasswordFormCommon#password_strength_link apps/web/views/password_form_common.rb:22-24
web_1 | 5.2: UserRepository#find_member lib/conversagence/repositories/user_repository.rb:53-54
web_1 | 5.2: UserRepository#find_with_articles lib/conversagence/repositories/user_repository.rb:61-65
web_1 | 5.2: ArticleRepository#all_with_authors lib/conversagence/repositories/article_repository.rb:8-9
web_1 | 5.2: Web::Views::Home::Index::MetadataSummary#article_age_string apps/web/views/home/index/metadata_summary.rb:43-44
web_1 | 5.1: ChangeUserPassword#verify_user lib/conversagence/interactors/change_user_password.rb:68-73
web_1 | 5.1: Web::Views::Home::Index::TopMenu#member_status_menu apps/web/views/home/index/top_menu.rb:43-44
web_1 | 5.1: Web::Views::Home::Index::TagButtons#call apps/web/views/home/index/tag_buttons.rb:18-21
web_1 | 5.0: Web::Views::Home::Index::TopMenu#top_menu_article_buttons apps/web/views/home/index/top_menu.rb:47-49
web_1 | 5.0: Web::Views::Home::Index::RenderFlashMessages#info_flash apps/web/views/home/index/flash_messages.rb:27-28
web_1 | 4.9: ChangeUserPassword#existing_user lib/conversagence/interactors/change_user_password.rb:48-50
web_1 | 4.9: UserRepository::FindUserByToken#validate_token_format lib/conversagence/repositories/user_repository.rb:33-36
web_1 | 4.9: Web::Views::PasswordFormCommon#_display_error_details apps/web/views/password_form_common.rb:50-51
web_1 | 4.8: Web::Controllers::PasswordResetRequest::Create#call apps/web/controllers/password_reset_request/create.rb:12-17
web_1 | 4.8: Web::Views::Home::Index::MetadataSummary#article_age_display apps/web/views/home/index/metadata_summary.rb:37-39
web_1 | 4.8: Web::Views::Home::Index#flash_messages apps/web/views/home/index/flash_messages.rb:7-8
web_1 | 4.8: Web::Controllers::Shared::PasswordCreate#errors_from apps/web/controllers/shared/password_create.rb:12-13
web_1 | Total score (lower is better) = 0
web_1 | 0 total warnings
web_1 | Running RuboCop...
web_1 |
web_1 | 105 files inspected, no offenses detected
web_1 |
web_1 | Cops disabled line ranges:
web_1 |
conversagence_web_1 exited with code 0
Stopping browser ...
Stopping conversagence_db_1 ...
using --exit-code-from implies --abort-on-container-exit
Creating network "conversagence_default" with the default driver
Building web
Step 1/8 : FROM jdickey/conversagence-base:alpine
---> f48397b9f0a5
Step 2/8 : ENV APP_HOME /app
---> Running in 321550a15a7c
Removing intermediate container 321550a15a7c
---> 20cfdacbce7c
Step 3/8 : RUN mkdir -p $APP_HOME/bin
---> Running in a5d1798f2ad8
Removing intermediate container a5d1798f2ad8
---> 37a4b540a005
Step 4/8 : WORKDIR $APP_HOME
---> Running in d15326ebf7dc
Removing intermediate container d15326ebf7dc
---> ada1ca48613b
Step 5/8 : COPY Gemfile $APP_HOME
---> 0085896542d8
Step 6/8 : RUN bundle install --binstubs --local
---> Running in b454a3d08514
Resolving dependencies...
Using rake 12.3.1
Using public_suffix 3.0.3
Using addressable 2.5.2
Using ansi 1.5.0
Using ast 2.4.0
Using awesome_print 1.8.0
Using thread_safe 0.3.6
Using descendants_tracker 0.0.4
Using ice_nine 0.11.2
Using axiom-types 0.1.1
Using bcrypt 3.1.12
Using builder 3.2.3
Using bundler 1.16.6
Using byebug 10.0.2
Using mini_mime 1.0.1
Using mini_portile2 2.3.0
Using nokogiri 1.8.5
Using rack 2.0.5
Using rack-test 1.1.0
Using xpath 3.1.0
Using capybara 3.9.0
Using ffi 1.9.25
Using childprocess 0.9.0
Using coercible 1.0.0
Using equalizer 0.0.11
Using virtus 1.0.5
Using codeclimate-engine-rb 0.4.1
Using coderay 1.1.2
Using concurrent-ruby 1.0.5
Using database_cleaner 1.7.0
Using docile 1.3.1
Using dotenv 2.5.0
Using dry-configurable 0.7.0
Using dry-container 0.6.0
Using dry-core 0.4.7
Using dry-equalizer 0.2.1
Using dry-initializer 1.4.1
Using dry-logic 0.4.2
Using dry-monads 1.0.1
Using inflecto 0.0.2
Using dry-types 0.11.1
Using dry-struct 0.3.1
Using dry-validation 0.11.0
Using netaddr 2.0.3
Using unf_ext 0.0.7.5
Using unf 0.1.4
Using simpleidn 0.1.1
Using email_address 0.1.11
Using erubis 2.7.0
Using fabrication 2.20.1
Using ffaker 2.10.0
Using path_expander 1.0.3
Using sexp_processor 4.11.0
Using ruby_parser 3.11.0
Using flay 2.12.0
Using flog 4.6.2
Using transproc 1.0.2
Using hanami-utils 1.2.0
Using hanami-helpers 1.2.2
Using tilt 2.0.8
Using hanami-assets 1.2.0
Using hanami-cli 0.2.0
Using hanami-controller 1.2.0
Using mail 2.7.0
Using hanami-mailer 1.2.0
Using url_mount 0.2.1
Using http_router 0.11.2
Using hanami-router 1.2.0
Using hanami-validations 1.2.2
Using hanami-view 1.2.0
Using hanami 1.2.0
Using hanami-fabrication 0.1.0
Using rom-mapper 0.5.1
Using rom 3.3.3
Using rom-repository 1.4.0
Using sequel 4.49.0
Using rom-sql 1.3.5
Using hanami-model 1.2.0
Using jaro_winkler 1.5.1
Using json 2.1.0
Using kwalify 0.7.2
Using method_source 0.9.0
Using minitest 5.11.3
Using minitest-hooks 1.5.0
Using minitest-matchers 1.4.1
Using ruby-progressbar 1.10.0
Using minitest-reporters 1.3.5
Using minitest-tagz 1.6.0
Using parallel 1.12.1
Using parser 2.5.1.2
Using pg 1.1.3
Using powerpack 0.1.2
Using pry 0.11.3
Using pry-byebug 3.6.0
Using yard 0.9.16
Using pry-doc 0.13.4
Using puma 3.12.0
Using rainbow 3.0.0
Using rb-fsevent 0.10.3
Using rb-inotify 0.9.10
Using reek 5.1.0
Using unicode-display_width 1.4.0
Using rubocop 0.59.2
Using rubyzip 1.2.2
Using sass-listen 4.0.0
Using sass 3.6.0
Using selenium-webdriver 3.14.1
Using shotgun 0.9.2
Using simplecov-html 0.10.2
Using simplecov 0.16.1
Using strong_password 0.0.6
Using tachiban 0.6.0
Using timerizer 0.3.0
Bundle complete! 31 Gemfile dependencies, 113 gems now installed.
Bundled gems are installed into `/usr/local/bundle`
Removing intermediate container b454a3d08514
---> b25648513f65
Step 7/8 : ADD . $APP_HOME
---> e3e50121c469
Step 8/8 : CMD bin/hanami server --host=0.0.0.0
---> Running in 03745fe7be50
Removing intermediate container 03745fe7be50
---> 2f8140832e5b
Successfully built 2f8140832e5b
Successfully tagged jdickey/conversagence:dev-14-20181012
Image for service web was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating conversagence_db_1 ...
Creating browser ...
browser | 2018-10-12 06:12:58,611 WARN Included extra file "/etc/supervisor/conf.d/selenium-debug.conf" during parsing
browser | 2018-10-12 06:12:58,611 WARN Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
browser | 2018-10-12 06:12:58,612 INFO supervisord started with pid 6
web_1 | LOCAL_IP=172.27.0.4
web_1 | SELENIUM_URL=http://browser:4444
db_1 | 2018-10-12 06:12:58.404 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2018-10-12 06:12:58.405 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2018-10-12 06:12:58.408 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2018-10-12 06:12:58.420 UTC [12] LOG: database system was shut down at 2018-10-12 06:00:30 UTC
db_1 | 2018-10-12 06:12:58.425 UTC [1] LOG: database system is ready to accept connections
browser | 2018-10-12 06:12:59,614 INFO spawned: 'xvfb' with pid 9
browser | 2018-10-12 06:12:59,615 INFO spawned: 'fluxbox' with pid 10
browser | 2018-10-12 06:12:59,616 INFO spawned: 'vnc' with pid 11
browser | 2018-10-12 06:12:59,618 INFO spawned: 'selenium-standalone' with pid 13
browser | 2018-10-12 06:12:59,773 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
browser | 2018-10-12 06:12:59,774 INFO success: fluxbox entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
browser | 2018-10-12 06:12:59,774 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
browser | 2018-10-12 06:12:59,774 INFO success: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
browser | 06:13:00.598 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.14.0', revision: 'aacccce0'
browser | 06:13:00.601 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444
browser | 2018-10-12 06:13:01.034:INFO::main: Logging initialized @1363ms to org.seleniumhq.jetty9.util.log.StdErrLog
browser | 06:13:01.456 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
web_1 | Run options: --seed 65176
web_1 |
web_1 | # Running:
web_1 |
web_1 | .............................S.....S...............................................Capybara starting Puma...
web_1 | * Version 3.12.0 , codename: Llamas in Pajamas
web_1 | * Min threads: 0, max threads: 4
web_1 | * Listening on tcp://172.27.0.4:55555
browser | 06:13:09.798 INFO [ActiveSessionFactory.apply] - Capabilities are: {
browser | "browserName": "firefox",
browser | "cssSelectorsEnabled": true,
browser | "javascriptEnabled": true,
browser | "nativeEvents": false,
browser | "rotatable": false,
browser | "takesScreenshot": true,
browser | "version": ""
browser | }
browser | 06:13:09.801 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
browser | 1539324790306 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.o4OXSgtGr1ck"
browser | 1539324791931 Marionette INFO Listening on port 46629
browser | 1539324792065 Marionette DEBUG [2147483649] Frame script loaded
browser | 1539324792067 Marionette DEBUG [2147483649] Frame script registered
browser | 06:13:12.096 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
browser | 06:13:12.171 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session 6ec9b3d3-e54b-4387-8c5f-6fb1d5b080a7 (org.openqa.selenium.firefox.GeckoDriverService)
browser | 1539324792241 Marionette DEBUG [2147483649] Received DOM event beforeunload for about:blank
browser | 1539325091905 Marionette DEBUG [2147483649] Received DOM event beforeunload for about:blank
browser | 1539325391651 Marionette DEBUG [2147483649] Received DOM event beforeunload for about:blank
browser | 1539325391654 Marionette DEBUG [2147483649] Received DOM event pagehide for about:blank
browser | 1539325391655 Marionette DEBUG [2147483649] Received DOM event unload for about:blank
browser | 1539325391662 Marionette DEBUG [2147483649] Received DOM event DOMContentLoaded for about:blank
browser | 1539325391678 Marionette DEBUG [2147483649] Received DOM event pageshow for about:blank
browser | 1539325811481 Marionette DEBUG [2147483649] Received DOM event beforeunload for about:blank
(20 minutes later, still waiting...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment