test-prof: Remove `factory_default: :keep` metatag
The following discussion from !126473 (merged) should be addressed:
-
@eugielimpin started a discussion: (+1 comment)
note:
factory_default: :keep
is needed to makecreate_default
work withlet_it_be
(src)Interestingly, doc says
So, it's possible to call create_default within let_it_be without any additional configuration.
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Peter Leitzen changed milestone to %16.3
changed milestone to %16.3
- Peter Leitzen added backend maintenancerefactor test typemaintenance labels
added backend maintenancerefactor test typemaintenance labels
- Peter Leitzen assigned to @splattael
assigned to @splattael
- Author Maintainer
test-prof
's doc says:Defaults created within
before_all
andlet_it_be
are not reset after each example, but only at the end of the corresponding example group.That's a good observation! Removing
factory_default: :keep
creates more factories though (176 instead of 98). It seems that the factory definitions are actually not reset but the association mapping (read: the "factory defaults") are. So,create(:issue)
, does not use the previously createdproject
association anymore. I might be wrong here though. /cc @igor.drozdovPerhaps that's why
factory_default: :keep
is needed.I also noticed that we are
require
'ingFactoryDefault
without using its recipetest_prof/recipes/rspec/factory_default
. It did not make a change but I'd like to investigate whether our docs ortest-prof
's needs an updateNote, looking at https://github.com/test-prof/test-prof/blob/master/spec/integrations/fixtures/rspec/factory_default_let_it_be_fixture.rb it seems the associations should be reused though...
Mh, after some testing and removing
factory_default: :keep
+TestProf::FactoryDefault.reset
inspec/support/factory_default.rb
the factory default still works as beforeSo, perhaps the
test-prof
's docs are right after all andfactory_default: :keep
is not needed becauselet_it_be
+create_default
already works we want it to work?Edited by Peter Leitzen 1 - Peter Leitzen mentioned in merge request !126473 (merged)
mentioned in merge request !126473 (merged)
- Maintainer
@splattael, Please add a group or category label to identify issue ownership.You can refer to the Features by Group handbook page for guidance.
If you are unsure about the correct group, please do not leave the issue without a group label, and refer to GitLab's shared responsibility functionality guidelines for more information on how to triage this kind of issue.
This message was generated automatically. You're welcome to improve it.
- Contributor
This issue was automatically tagged with the label groupthreat insights by TanukiStan, a machine learning classification model, with a probability of 0.6.
If this label is incorrect, please tag this issue with the correct group label as well as automation:ml wrong to help TanukiStan learn from its mistakes.
If you are unsure about the correct group, please do not leave the issue without a group label. Please refer to GitLab's shared responsibility functionality guidelines for more information on how to triage this kind of issues.
Authors who do not have permission to update labels can leave the issue to be triaged by group leaders initially assigned by TanukiStan
This message was generated automatically. You're welcome to improve it.
- A deleted user added automation:ml groupthreat insights labels
added automation:ml groupthreat insights labels
- 🤖 GitLab Bot 🤖 added devopsgovern sectionsec labels
added devopsgovern sectionsec labels
- Peter Leitzen added grouprespond label and removed groupthreat insights label
added grouprespond label and removed groupthreat insights label
- 🤖 GitLab Bot 🤖 added devopsmonitor label and removed devopsgovern label
added devopsmonitor label and removed devopsgovern label
- Peter Leitzen added automation:ml wrong label
added automation:ml wrong label
- Ghost User mentioned in issue gitlab-org/monitor/respond#255 (closed)
mentioned in issue gitlab-org/monitor/respond#255 (closed)
- Ghost User mentioned in issue gitlab-org/monitor/respond#260 (closed)
mentioned in issue gitlab-org/monitor/respond#260 (closed)
- Ghost User mentioned in issue gitlab-org/monitor/respond#263 (closed)
mentioned in issue gitlab-org/monitor/respond#263 (closed)
- Ghost User mentioned in issue gitlab-org/monitor/respond#265 (closed)
mentioned in issue gitlab-org/monitor/respond#265 (closed)
- Ghost User mentioned in issue gitlab-org/monitor/respond#264 (closed)
mentioned in issue gitlab-org/monitor/respond#264 (closed)
- Ghost User mentioned in issue gitlab-org/monitor/respond#266 (closed)
mentioned in issue gitlab-org/monitor/respond#266 (closed)
- 🤖 GitLab Bot 🤖 changed milestone to %16.4
changed milestone to %16.4
- 🤖 GitLab Bot 🤖 added missed:16.3 label
added missed:16.3 label
- 🤖 GitLab Bot 🤖 changed milestone to %16.5
changed milestone to %16.5
- 🤖 GitLab Bot 🤖 added missed:16.4 label
added missed:16.4 label
- 🤖 GitLab Bot 🤖 changed milestone to %16.6
changed milestone to %16.6
- 🤖 GitLab Bot 🤖 added missed:16.5 label
added missed:16.5 label
- 🤖 GitLab Bot 🤖 changed milestone to %16.7
changed milestone to %16.7
- 🤖 GitLab Bot 🤖 added missed:16.6 label
added missed:16.6 label
- 🤖 GitLab Bot 🤖 changed milestone to %16.8
changed milestone to %16.8
- 🤖 GitLab Bot 🤖 added missed:16.7 label
added missed:16.7 label
- 🤖 GitLab Bot 🤖 changed milestone to %16.9
changed milestone to %16.9
- 🤖 GitLab Bot 🤖 added missed:16.8 label
added missed:16.8 label
- 🤖 GitLab Bot 🤖 changed milestone to %16.10
changed milestone to %16.10
- 🤖 GitLab Bot 🤖 added missed:16.9 label
added missed:16.9 label
- 🤖 GitLab Bot 🤖 changed milestone to %16.11
changed milestone to %16.11
- 🤖 GitLab Bot 🤖 added missed:16.10 label
added missed:16.10 label
- 🤖 GitLab Bot 🤖 changed milestone to %17.0
changed milestone to %17.0
- 🤖 GitLab Bot 🤖 added missed:16.11 label
added missed:16.11 label
- Peter Leitzen mentioned in merge request !149885 (merged)
mentioned in merge request !149885 (merged)
- 🤖 GitLab Bot 🤖 changed milestone to %17.1
changed milestone to %17.1
- 🤖 GitLab Bot 🤖 added missed:17.0 label
added missed:17.0 label
- 🤖 GitLab Bot 🤖 changed milestone to %17.2
changed milestone to %17.2
- 🤖 GitLab Bot 🤖 added missed:17.1 label
added missed:17.1 label
- 🤖 GitLab Bot 🤖 changed milestone to %17.3
changed milestone to %17.3
- 🤖 GitLab Bot 🤖 added missed:17.2 label
added missed:17.2 label
- 🤖 GitLab Bot 🤖 changed milestone to %17.4
changed milestone to %17.4
- 🤖 GitLab Bot 🤖 added missed:17.3 label
added missed:17.3 label
- 🤖 GitLab Bot 🤖 changed milestone to %17.5
changed milestone to %17.5
- 🤖 GitLab Bot 🤖 added missed:17.4 label
added missed:17.4 label
- 🤖 GitLab Bot 🤖 changed milestone to %17.6
changed milestone to %17.6
- 🤖 GitLab Bot 🤖 added missed:17.5 label
added missed:17.5 label
- 🤖 GitLab Bot 🤖 changed milestone to %17.7
changed milestone to %17.7
- 🤖 GitLab Bot 🤖 added missed:17.6 label
added missed:17.6 label
- 🤖 GitLab Bot 🤖 changed milestone to %17.8
changed milestone to %17.8
- 🤖 GitLab Bot 🤖 added missed:17.7 label
added missed:17.7 label
- 🤖 GitLab Bot 🤖 changed milestone to %17.9
changed milestone to %17.9
- 🤖 GitLab Bot 🤖 added missed:17.8 label
added missed:17.8 label
- 🤖 GitLab Bot 🤖 changed milestone to %17.10
changed milestone to %17.10
- 🤖 GitLab Bot 🤖 added missed:17.9 label
added missed:17.9 label