Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
306dff08
Commit
306dff08
authored
Oct 19, 2020
by
Alishan Ladhani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix FactoryBot/InlineAssociation for serverless & terraform
parent
99035e62
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
11 deletions
+8
-11
.rubocop_todo.yml
.rubocop_todo.yml
+0
-3
ee/spec/replicators/geo/terraform_state_version_replicator_spec.rb
...eplicators/geo/terraform_state_version_replicator_spec.rb
+1
-1
spec/factories/serverless/domain.rb
spec/factories/serverless/domain.rb
+2
-2
spec/factories/serverless/domain_cluster.rb
spec/factories/serverless/domain_cluster.rb
+3
-3
spec/factories/terraform/state.rb
spec/factories/terraform/state.rb
+2
-2
No files found.
.rubocop_todo.yml
View file @
306dff08
...
...
@@ -1337,8 +1337,5 @@ FactoryBot/InlineAssociation:
-
'
spec/factories/resource_milestone_event.rb'
-
'
spec/factories/resource_state_event.rb'
-
'
spec/factories/sent_notifications.rb'
-
'
spec/factories/serverless/domain.rb'
-
'
spec/factories/serverless/domain_cluster.rb'
-
'
spec/factories/terraform/state.rb'
-
'
spec/factories/uploads.rb'
-
'
spec/factories/wiki_pages.rb'
ee/spec/replicators/geo/terraform_state_version_replicator_spec.rb
View file @
306dff08
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
RSpec
.
describe
Geo
::
TerraformStateVersionReplicator
do
let
(
:model_record
)
{
build
(
:terraform_state_version
)
}
let
(
:model_record
)
{
build
(
:terraform_state_version
,
terraform_state:
create
(
:terraform_state
)
)
}
it_behaves_like
'a blob replicator'
end
spec/factories/serverless/domain.rb
View file @
306dff08
...
...
@@ -3,8 +3,8 @@
FactoryBot
.
define
do
factory
:serverless_domain
,
class:
'::Serverless::Domain'
do
function_name
{
'test-function'
}
serverless_domain_cluster
{
create
(
:serverless_domain_cluster
)
}
environment
{
create
(
:environment
)
}
serverless_domain_cluster
{
association
(
:serverless_domain_cluster
)
}
environment
{
association
(
:environment
)
}
skip_create
end
...
...
spec/factories/serverless/domain_cluster.rb
View file @
306dff08
...
...
@@ -2,9 +2,9 @@
FactoryBot
.
define
do
factory
:serverless_domain_cluster
,
class:
'::Serverless::DomainCluster'
do
pages_domain
{
create
(
:pages_domain
)
}
knative
{
create
(
:clusters_applications_knative
)
}
creator
{
create
(
:user
)
}
pages_domain
{
association
(
:pages_domain
)
}
knative
{
association
(
:clusters_applications_knative
)
}
creator
{
association
(
:user
)
}
certificate
do
File
.
read
(
Rails
.
root
.
join
(
'spec/fixtures/'
,
'ssl_certificate.pem'
))
...
...
spec/factories/terraform/state.rb
View file @
306dff08
...
...
@@ -2,7 +2,7 @@
FactoryBot
.
define
do
factory
:terraform_state
,
class:
'Terraform::State'
do
project
{
create
(
:project
)
}
project
{
association
(
:project
)
}
sequence
(
:name
)
{
|
n
|
"state-
#{
n
}
"
}
...
...
@@ -14,7 +14,7 @@ FactoryBot.define do
trait
:locked
do
sequence
(
:lock_xid
)
{
|
n
|
"lock-
#{
n
}
"
}
locked_at
{
Time
.
current
}
locked_by_user
{
create
(
:user
)
}
locked_by_user
{
association
(
:user
)
}
end
trait
:with_version
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment