Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joanne Hugé
slapos
Commits
9154c141
Commit
9154c141
authored
Jan 26, 2024
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gitlab resiliency test: gitlab SR now setup https by default
parent
cb4f04dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
software/theia/test/project_tests.py
software/theia/test/project_tests.py
+8
-8
No files found.
software/theia/test/project_tests.py
View file @
9154c141
...
...
@@ -520,17 +520,17 @@ class TestTheiaResilienceGitlab(test_resiliency.TestTheiaResilience):
# The project name is sample-test, which we created above.
self
.
assertIn
(
"sample-test"
,
projects
[
0
][
'name_with_namespace'
])
# Get repo url, default one is http://lab.example.com/root/sample-test.git
# We need the path like http://[2001:67c:1254:e:c4::5041]:7777/root/sample-test
# Get repo url, default one is http
s
://lab.example.com/root/sample-test.git
# We need the path like http
s
://[2001:67c:1254:e:c4::5041]:7777/root/sample-test
project_1
=
projects
[
0
]
repo_url
=
backend_url
.
replace
(
"http://"
,
""
)
+
"/"
+
project_1
[
'path_with_namespace'
]
repo_url
=
backend_url
.
replace
(
"http
s
://"
,
""
)
+
"/"
+
project_1
[
'path_with_namespace'
]
# Clone the repo with token
clone_url
=
'http://oauth2:'
+
'SLurtnxPscPsU-SDm4oN@'
+
repo_url
clone_url
=
'http
s
://oauth2:'
+
'SLurtnxPscPsU-SDm4oN@'
+
repo_url
repo_path
=
os
.
path
.
join
(
os
.
getcwd
(),
project_1
[
'name'
])
print
(
repo_path
)
if
os
.
path
.
exists
(
repo_path
):
shutil
.
rmtree
(
repo_path
,
ignore_errors
=
True
)
output
=
subprocess
.
check_output
((
'git'
,
'clone'
,
clone_url
),
universal_newlines
=
True
)
output
=
subprocess
.
check_output
((
'git'
,
'clone'
,
'-c'
,
'http.sslVerify=false'
,
clone_url
),
universal_newlines
=
True
)
# Create a new file and push the commit
f
=
open
(
os
.
path
.
join
(
repo_path
,
'file.txt'
),
'x'
)
...
...
@@ -566,7 +566,7 @@ class TestTheiaResilienceGitlab(test_resiliency.TestTheiaResilience):
print
(
repo_path
)
if
os
.
path
.
exists
(
repo_path
):
shutil
.
rmtree
(
repo_path
,
ignore_errors
=
True
)
output
=
subprocess
.
check_output
((
'git'
,
'clone'
,
clone_url
),
universal_newlines
=
True
)
output
=
subprocess
.
check_output
((
'git'
,
'clone'
,
'-c'
,
'http.sslVerify=false'
,
clone_url
),
universal_newlines
=
True
)
# Check the file we committed in exist and the content is matching.
output
=
subprocess
.
check_output
((
'git'
,
'show'
,
'origin/master:file.txt'
),
cwd
=
repo_path
,
universal_newlines
=
True
)
...
...
@@ -596,8 +596,8 @@ class TestTheiaResilienceGitlab(test_resiliency.TestTheiaResilience):
# The project name is sample-test, which we created above.
self
.
assertIn
(
"sample-test"
,
projects
[
0
][
'name_with_namespace'
])
project_1
=
projects
[
0
]
repo_url
=
backend_url
.
replace
(
"http://"
,
""
)
+
"/"
+
project_1
[
'path_with_namespace'
]
clone_url
=
'http://oauth2:'
+
'SLurtnxPscPsU-SDm4oN@'
+
repo_url
repo_url
=
backend_url
.
replace
(
"http
s
://"
,
""
)
+
"/"
+
project_1
[
'path_with_namespace'
]
clone_url
=
'http
s
://oauth2:'
+
'SLurtnxPscPsU-SDm4oN@'
+
repo_url
repo_path
=
os
.
path
.
join
(
os
.
getcwd
(),
project_1
[
'name'
])
# Check the file we committed in the original theia is exist and the content is matching.
...
...
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