Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

refs #17201 - add rspec tests for migrations #425

Merged
merged 1 commit into from Nov 4, 2016

Conversation

stbenjam
Copy link
Contributor

@stbenjam stbenjam commented Nov 4, 2016

No description provided.

end

after(:each) do
`git reset HEAD --hard`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may surprise developers who run tests. Maybe assert git status --short config/ is empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, good point. I'll just fix it so the test migrations don't dump their answers back into the git repo, which is the only reason I have the reset.

@stbenjam
Copy link
Contributor Author

stbenjam commented Nov 4, 2016

@ekohl Updated

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Feel free to merge once the tests pass.

let(:migrator) { Kafo::Migrations.new(scenario[:migrations]).run(scenario[:config].dup, scenario[:answers].dup) }

it 'does not change scenario config' do
after, _ = migrator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rubocop doesn't like this

@stbenjam
Copy link
Contributor Author

stbenjam commented Nov 4, 2016

Thanks!

@stbenjam stbenjam merged commit eb38e66 into Katello:master Nov 4, 2016
@stbenjam stbenjam deleted the rspec branch November 4, 2016 16:38
@ekohl
Copy link
Member

ekohl commented Nov 4, 2016

Thanks! This also adds tests to all our migrations which I believe we didn't have at first. That's a cool addition.

@stbenjam
Copy link
Contributor Author

stbenjam commented Nov 4, 2016

Indeed, maybe it's useful to foreman-installer? theforeman/foreman-installer#208

zjhuntin pushed a commit to zjhuntin/katello-installer that referenced this pull request Oct 30, 2018
Refs #12556 - fix content host reference
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants