Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab
Commits
e80e4e14
Commit
e80e4e14
authored
3 months ago
by
Gabriel Mazetto
Browse files
Options
Downloads
Patches
Plain Diff
Add a TestContext as a future replacement to the FakeContext
parent
83eb9d21
No related branches found
No related tags found
3 merge requests
!181325
Fix ambiguous `created_at` in project.rb
,
!179611
Draft: Rebase CR approach for zoekt assignments
,
!170246
Decouple loading of db config from the rails codebase
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gems/gitlab-backup-cli/spec/support/helpers.rb
+4
-0
4 additions, 0 deletions
gems/gitlab-backup-cli/spec/support/helpers.rb
gems/gitlab-backup-cli/spec/support/test_context.rb
+17
-0
17 additions, 0 deletions
gems/gitlab-backup-cli/spec/support/test_context.rb
with
21 additions
and
0 deletions
gems/gitlab-backup-cli/spec/support/helpers.rb
+
4
−
0
View file @
e80e4e14
...
...
@@ -32,6 +32,10 @@ def build_fake_context
env:
ActiveSupport
::
EnvironmentInquirer
.
new
(
'test'
)
)
end
def
build_test_context
TestContext
.
new
end
end
RSpec
.
configure
do
|
config
|
...
...
This diff is collapsed.
Click to expand it.
gems/gitlab-backup-cli/spec/support/test_context.rb
0 → 100644
+
17
−
0
View file @
e80e4e14
# frozen_string_literal: true
class
TestContext
<
Gitlab
::
Backup
::
Cli
::
Context
::
SourceContext
def
gitlab_basepath
test_helpers
.
spec_path
.
join
(
'../../..'
)
end
def
backup_basedir
test_helpers
.
temp_path
.
join
(
'backups'
)
end
private
def
test_helpers
Class
.
new
.
extend
(
GitlabBackupHelpers
)
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment