Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #36395 - move value setting to seed #9707

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

ShimShtein
Copy link
Member

No description provided.

@theforeman-bot
Copy link
Member

Issues: #36395

@evgeni
Copy link
Member

evgeni commented May 16, 2023

In #9500 we discussed that such things are better as seeds, not migrations.

@ShimShtein
Copy link
Member Author

Moved to seeds

@evgeni
Copy link
Member

evgeni commented May 16, 2023

I wonder if we should add a test for that in test/unit/tasks/seeds_test.rb? something like:

test 'ensures stable instance_id' do
  seed
  instance_id = Setting[:instance_id]
  assert instance_id, "instance_id was not generated"

  seed
  assert_equal instance_id, Setting[:instance_id]
end

@ShimShtein
Copy link
Member Author

Tests added

@evgeni evgeni changed the title Fixes #36395 - move value setting to migration Fixes #36395 - move value setting to seed Jun 1, 2023
@evgeni evgeni merged commit 02dd983 into theforeman:develop Jun 1, 2023
7 checks passed
@ehelms ehelms added the Needs cherrypick This should be cherrypicked to the stable branches or branches label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs cherrypick This should be cherrypicked to the stable branches or branches
Projects
None yet
4 participants