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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
7a98f0bd
Commit
7a98f0bd
authored
Nov 12, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Just fix (hack) specs"
This reverts commit
c739b8e0
.
parent
c739b8e0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+1
-1
spec/models/environment_status_spec.rb
spec/models/environment_status_spec.rb
+1
-1
spec/services/update_deployment_service_spec.rb
spec/services/update_deployment_service_spec.rb
+6
-6
spec/support/helpers/cycle_analytics_helpers.rb
spec/support/helpers/cycle_analytics_helpers.rb
+1
-1
No files found.
spec/models/ci/build_spec.rb
View file @
7a98f0bd
...
@@ -800,7 +800,7 @@ describe Ci::Build do
...
@@ -800,7 +800,7 @@ describe Ci::Build do
end
end
describe
'state transition as a deployable'
do
describe
'state transition as a deployable'
do
let!
(
:build
)
{
create
(
:ci_build
,
:start_review_app
)
.
reload
}
let!
(
:build
)
{
create
(
:ci_build
,
:start_review_app
)
}
let
(
:deployment
)
{
build
.
deployment
}
let
(
:deployment
)
{
build
.
deployment
}
let
(
:environment
)
{
deployment
.
environment
}
let
(
:environment
)
{
deployment
.
environment
}
...
...
spec/models/environment_status_spec.rb
View file @
7a98f0bd
...
@@ -94,7 +94,7 @@ describe EnvironmentStatus do
...
@@ -94,7 +94,7 @@ describe EnvironmentStatus do
describe
'.build_environments_status'
do
describe
'.build_environments_status'
do
subject
{
described_class
.
send
(
:build_environments_status
,
merge_request
,
user
,
sha
)
}
subject
{
described_class
.
send
(
:build_environments_status
,
merge_request
,
user
,
sha
)
}
let!
(
:build
)
{
create
(
:ci_build
,
:deploy_to_production
,
pipeline:
pipeline
)
.
reload
}
let!
(
:build
)
{
create
(
:ci_build
,
:deploy_to_production
,
pipeline:
pipeline
)
}
let
(
:environment
)
{
build
.
deployment
.
environment
}
let
(
:environment
)
{
build
.
deployment
.
environment
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
owner
}
...
...
spec/services/update_deployment_service_spec.rb
View file @
7a98f0bd
...
@@ -10,7 +10,7 @@ describe UpdateDeploymentService do
...
@@ -10,7 +10,7 @@ describe UpdateDeploymentService do
tag:
false
,
tag:
false
,
environment:
'production'
,
environment:
'production'
,
options:
{
environment:
options
},
options:
{
environment:
options
},
project:
project
)
.
reload
project:
project
)
end
end
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
...
@@ -99,7 +99,7 @@ describe UpdateDeploymentService do
...
@@ -99,7 +99,7 @@ describe UpdateDeploymentService do
ref:
'master'
,
ref:
'master'
,
environment:
'production'
,
environment:
'production'
,
project:
project
,
project:
project
,
options:
{
environment:
{
name:
'production'
,
url:
'http://review/$CI_COMMIT_REF_NAME'
}
})
.
reload
options:
{
environment:
{
name:
'production'
,
url:
'http://review/$CI_COMMIT_REF_NAME'
}
})
end
end
it
{
is_expected
.
to
eq
(
'http://review/master'
)
}
it
{
is_expected
.
to
eq
(
'http://review/master'
)
}
...
@@ -111,7 +111,7 @@ describe UpdateDeploymentService do
...
@@ -111,7 +111,7 @@ describe UpdateDeploymentService do
ref:
'master'
,
ref:
'master'
,
environment:
'prod-slug'
,
environment:
'prod-slug'
,
project:
project
,
project:
project
,
options:
{
environment:
{
name:
'prod-slug'
,
url:
'http://review/$CI_ENVIRONMENT_SLUG'
}
})
.
reload
options:
{
environment:
{
name:
'prod-slug'
,
url:
'http://review/$CI_ENVIRONMENT_SLUG'
}
})
end
end
it
{
is_expected
.
to
eq
(
'http://review/prod-slug'
)
}
it
{
is_expected
.
to
eq
(
'http://review/prod-slug'
)
}
...
@@ -123,14 +123,14 @@ describe UpdateDeploymentService do
...
@@ -123,14 +123,14 @@ describe UpdateDeploymentService do
yaml_variables:
[{
key: :APP_HOST
,
value:
'host'
}],
yaml_variables:
[{
key: :APP_HOST
,
value:
'host'
}],
environment:
'production'
,
environment:
'production'
,
project:
project
,
project:
project
,
options:
{
environment:
{
name:
'production'
,
url:
'http://review/$APP_HOST'
}
})
.
reload
options:
{
environment:
{
name:
'production'
,
url:
'http://review/$APP_HOST'
}
})
end
end
it
{
is_expected
.
to
eq
(
'http://review/host'
)
}
it
{
is_expected
.
to
eq
(
'http://review/host'
)
}
end
end
context
'when yaml environment does not have url'
do
context
'when yaml environment does not have url'
do
let
(
:job
)
{
create
(
:ci_build
,
environment:
'staging'
,
project:
project
)
.
reload
}
let
(
:job
)
{
create
(
:ci_build
,
environment:
'staging'
,
project:
project
)
}
it
'returns the external_url from persisted environment'
do
it
'returns the external_url from persisted environment'
do
is_expected
.
to
be_nil
is_expected
.
to
be_nil
...
@@ -160,7 +160,7 @@ describe UpdateDeploymentService do
...
@@ -160,7 +160,7 @@ describe UpdateDeploymentService do
tag:
false
,
tag:
false
,
environment:
'staging'
,
environment:
'staging'
,
options:
{
environment:
{
name:
'staging'
}
},
options:
{
environment:
{
name:
'staging'
}
},
project:
project
)
.
reload
project:
project
)
end
end
it
"doesn't set the time if the deploy's environment is not 'production'"
do
it
"doesn't set the time if the deploy's environment is not 'production'"
do
...
...
spec/support/helpers/cycle_analytics_helpers.rb
View file @
7a98f0bd
...
@@ -115,7 +115,7 @@ module CycleAnalyticsHelpers
...
@@ -115,7 +115,7 @@ module CycleAnalyticsHelpers
name:
'dummy'
,
name:
'dummy'
,
stage:
'dummy'
,
stage:
'dummy'
,
pipeline:
dummy_pipeline
(
project
),
pipeline:
dummy_pipeline
(
project
),
protected:
false
)
.
reload
protected:
false
)
end
end
def
mock_gitaly_multi_action_dates
(
repository
,
commit_time
)
def
mock_gitaly_multi_action_dates
(
repository
,
commit_time
)
...
...
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