Tag: rspec

Use zeus with Rails 3 and docker

We have a Rails 3.2.9 app, and recently switched to Docker in development. By now, I’ve always used zeus local on my machine to preload my codebase and execute tests with Rspec faster. But how would you achieve this with docker? When I try to install zeus inside my container with gem install zeus and […]

Docker containers on travis-ci

I have a Dockerfile that I am attempting to test using RSpec, serverspec and docker-api. Locally (using boot2docker as I am on OS X) this works great and all my test pass, but on travis-ci none of the tests pass. My .travis.yml file is as such: language: ruby rvm: – “2.2.0” sudo: required cache: bundler […]

How can I reset a Dockerized Rails app for integration testing?

My (Rails and react.js) application under test depends on a primary API application to run that is in another repository. I have this API app running in docker, and my client application can communicate with it. Usually in Rails I use something like Database Cleaner to reset my DB between tests to ensure a clean […]

Running tests with Docker and Jenkins – Test Result

I have an application written in Rails. In order to test it I’ve built a docker image. Everything works fine. The problem, however, appears when I configure Jenkins to run those tests. Here’s what I do, at the building step: docker-compose up rspec Where rspec is a service defined at docker-compose.yml and contains the following […]

docker.local hostname in /etc/hosts not resolving on OSX for docker machine (causing rspec tests to fail)

I had a bug today where my rspec tests ran fine, down to the last expectation, but then I still got a “database connection timeout error”. This is running rails locally, connecting to a postgres instance inside of docker, using docker machine. Docker machine instructions guided me to create an entry in my /etc/hosts file: […]

Spring can't connect to docker selenium container to run capybara via rspec

It looks like running rspec command via spring is unable to connect to local docker container with selenium running on docker-machine under osx to execute capybara tests. When invoking rspec command not via spring server – everything works fine, I can see container logs, and while running with spring – I can see nothing, and […]

Rspec test failing against Docker container

DISCLAIMER: I am new to ruby,rspec etc. I am trying to find a test framework for my docker containers I have a docker container that runs the aws cli. I have tested this manually and it work, as part of my tests I want to get the AWS version and check it. I have created […]

Docker failing to see updated fixtures CSV in rspec test directory

This one is quite strange. I am running a very typical Docker container that holds a Rails API. Inside this API, I have an endpoint which takes an upload of a CSV and does some things and stuff. Here is the exact flow: vim spec/fixtuers/bid_update.csv # fill it with some data # now we call […]

serverspec command returning blank strings

I am trying to test a Dockerfile using rspec, serverspec and docker-api gems. For the most part my tests are passing but all the tests that are using the command method are failing and returning blank strings regardless of the commands I am supplying. The code can be found on GitHub but the most salient […]

Testing multiple docker images with RSpec

Disclaimer: Am very new to ruby and rspec I’ve been attempting to build a private repo with docker images as base images for our different projects. We also trying to incorporate testing multiple docker images as part of the test suite. We though have weird problem with rspec, it seems like tests run on the […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.