Skip to content

Test case doesn't pass in Circle CI #17

@oLeVanNghia

Description

@oLeVanNghia

I write below codes.

database.yml

test: &test
  <<: *default
  host: 127.0.0.1
  database: test_db

test_reader:
  <<: *test
  host: localhost

TestModel

class TestModel < ActiveRecord::Base
  use_switch_point :common
end
require "rails_helper"

RSpec.describe TestModel, :use_transaction do
  it "test switch point" do
    SwitchPoint.with_readonly do
      expect(TestModel.connection.pool.spec.config[:host]).to eq("localhost")
    end
  end
end

This test case passed in local but failed in Circle CI.
Can anyone help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions