# bitbucket inherited fixtures rails test
script: # Modify the commands below to build your repository.
- cd $BITBUCKET_CLONE_DIR
- apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs ruby-dev libidn11 libidn11-dev yarn
- echo "bundle install"
- bundle install --path vender/bundle
- echo "migrate/seed/test"
- rake db:migrate RAILS_ENV=test
- rake test RAILS_ENV=test
Above is my pipeline file.
When the pipeline runs after a commit to the master branch, any test that references a fixture, that deals with a model that extends a different model, they fail.
class SomeClass < ApplicationRecord
class SecondClass < SomeClass
So, any test that is trying to find a fixture set in via the active record helper in tests fails:
Here, I'm trying to make an instance variable named second, by trying to find a SecondClass record, named some_record. This will fail the find the record, and there will be an error thrown in the pipeline output.
second = second_classes(:some_record)
Why is this? Or, how can ensure my tests pass in the Bitbucket Pipeline? They all pass locally.
Hello Community, I’m Anton Genkin, a product manager on the Bitbucket Server and Data Center team and am excited to share that Bitbucket Server 7.0 is now available! It's a platform release, one th...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events