Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
test-app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
test_group_xCESE
test-app
Commits
1babd3de
Commit
1babd3de
authored
4 years ago
by
Tuukka Terho
Browse files
Options
Downloads
Patches
Plain Diff
Refactored parameter and header naming
parent
47f2530d
Branches
Branches containing commit
Tags
v1
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test_app.py
+10
-10
10 additions, 10 deletions
test_app.py
with
10 additions
and
10 deletions
test_app.py
+
10
−
10
View file @
1babd3de
...
...
@@ -9,7 +9,7 @@ app = Flask(__name__)
servicesDomain
=
""
if
(
os
.
environ
.
get
(
"
SERVICES_DOMAIN
"
)
is
None
)
else
"
.
"
+
os
.
environ
.
get
(
"
SERVICES_DOMAIN
"
)
parametersHostname
=
"
parameter
"
if
(
parametersHostname
=
"
test-app-
parameter
s
"
if
(
os
.
environ
.
get
(
"
PARAMETERS_HOSTNAME
"
)
is
None
)
else
os
.
environ
.
get
(
"
PARAMETERS_HOSTNAME
"
)
...
...
@@ -28,20 +28,20 @@ url = parameters['name'] + "/" + parameters['endpoint']
def
returnJson
():
cookie
=
request
.
cookies
print
(
cookie
)
if
cookie
.
get
(
"
group
"
)
==
"
3
"
:
r
=
requests
.
get
(
url
,
headers
=
{
"
group
"
:
"
3
"
})
if
cookie
.
get
(
"
test-
group
"
)
==
"
group
3
"
:
r
=
requests
.
get
(
url
,
headers
=
{
"
test-
group
"
:
"
group
3
"
})
return
r
.
json
()
elif
cookie
.
get
(
"
group
"
)
==
"
4
"
:
r
=
requests
.
get
(
url
,
headers
=
{
"
group
"
:
"
4
"
})
elif
cookie
.
get
(
"
test-
group
"
)
==
"
group
4
"
:
r
=
requests
.
get
(
url
,
headers
=
{
"
test-
group
"
:
"
group
4
"
})
return
r
.
json
()
elif
cookie
.
get
(
"
group
"
)
==
"
5
"
:
r
=
requests
.
get
(
url
,
headers
=
{
"
group
"
:
"
5
"
})
elif
cookie
.
get
(
"
test-
group
"
)
==
"
group
5
"
:
r
=
requests
.
get
(
url
,
headers
=
{
"
test-
group
"
:
"
group
5
"
})
return
r
.
json
()
elif
cookie
.
get
(
"
group
"
)
==
"
6
"
:
r
=
requests
.
get
(
url
,
headers
=
{
"
group
"
:
"
6
"
})
elif
cookie
.
get
(
"
test-
group
"
)
==
"
group
6
"
:
r
=
requests
.
get
(
url
,
headers
=
{
"
test-
group
"
:
"
group
6
"
})
return
r
.
json
()
else
:
r
=
requests
.
get
(
url
,
headers
=
{
"
group
"
:
"
None
"
})
r
=
requests
.
get
(
url
,
headers
=
{
"
test-
group
"
:
"
None
"
})
return
r
.
json
()
...
...
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