Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.build
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
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.recipe.build
Commits
3536c8c4
Commit
3536c8c4
authored
Jan 16, 2019
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up test lines to make it more understandable
parent
169f89d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
slapos/recipe/build/tests.py
slapos/recipe/build/tests.py
+8
-8
No files found.
slapos/recipe/build/tests.py
View file @
3536c8c4
...
...
@@ -36,14 +36,14 @@ class GitCloneNonInformativeTests(unittest.TestCase):
def
setUpSubmoduleRepository
(
self
):
"""
This function
s set ups
repositories and config for parent repo and a
This function
sets up
repositories and config for parent repo and a
submodule repo and create small commits as well as links the 2 repos.
"""
# Add files in both main as well as submodule repo
os
.
mkdir
(
os
.
path
.
join
(
self
.
dir
,
'main_repo'
))
os
.
mkdir
(
os
.
path
.
join
(
self
.
dir
,
'submodule_repo'
))
# Create parent and submodule directory
self
.
project_dir
=
os
.
path
.
join
(
self
.
dir
,
'main_repo'
)
self
.
submodule_dir
=
os
.
path
.
join
(
self
.
dir
,
'submodule_repo'
)
os
.
mkdir
(
self
.
project_dir
)
os
.
mkdir
(
self
.
submodule_dir
)
# Add files in submodule repo and initialize git in it
check_call
([
'git'
,
'init'
],
cwd
=
self
.
submodule_dir
)
...
...
@@ -52,16 +52,16 @@ class GitCloneNonInformativeTests(unittest.TestCase):
self
.
gitAdd
(
self
.
submodule_dir
)
self
.
gitCommit
(
self
.
submodule_dir
,
msg
=
'Add file1 in submodule repo'
)
# Add files and folder in
main
repo and initialize git in it
# Add files and folder in
parent
repo and initialize git in it
check_call
([
'git'
,
'init'
],
cwd
=
self
.
project_dir
)
self
.
setUpGitConfig
(
self
.
project_dir
)
os
.
mkdir
(
os
.
path
.
join
(
self
.
project_dir
,
'dir1'
))
submodule_dir_main_repo
=
os
.
path
.
join
(
self
.
project_dir
,
'dir1'
)
os
.
mkdir
(
submodule_dir_main_repo
)
self
.
touch
(
self
.
project_dir
,
'file1.py'
)
self
.
gitAdd
(
self
.
project_dir
)
self
.
gitCommit
(
self
.
project_dir
,
msg
=
'Add file and folder in main repo'
)
# Add submodule to main repo
submodule_dir_main_repo
=
os
.
path
.
join
(
self
.
project_dir
,
'dir1'
)
# Add submodule to main repo and commit
check_call
([
'git'
,
'submodule'
,
'add'
,
self
.
submodule_dir
],
cwd
=
submodule_dir_main_repo
)
self
.
gitCommit
(
self
.
project_dir
,
msg
=
'Add submodule repo'
)
...
...
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