Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MEC - Multi-access Edge Computing
MEC Robot Test Suite
Commits
f8601eee
Commit
f8601eee
authored
Sep 27, 2019
by
Elian Kraja
Browse files
Fixing AMY.robot, solving issue#5
parent
0f26987f
Pipeline
#1594
failed with stage
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
MEX/ANY/ANY.robot
View file @
f8601eee
...
...
@@ -9,8 +9,7 @@ Library String
*** Variable ***
@{data}
https
|
localhost
|
8080
|
/alcmi/v1/app_instances
|
POST
|
{"key":"value"}
https
|
localhost
|
8080
|
/alcmi/v1/app_instances
|
GET
https
|
localhost
|
8080
|
/alcmi/v1/app_instances
|
PUT
${token}
Bearer InvalidToken
@{data}
/alcmi/v1/app_instances
|
POST
|
{"key":"value"}
/alcmi/v1/app_instances
|
GET
/alcmi/v1/app_instances
|
PUT
*** Test Cases ***
Request access to all resources using no token
[
Documentation
]
TP_MEC_MEX_ANY_001_NT
...
...
@@ -20,102 +19,110 @@ Request access to all resources using no token
[
Tags
]
GENERIC_TESTS
INCLUDE_UNDEFINED_SCHEMAS
: FOR
${INDEX}
IN RANGE
0
3
\
@{list}
Split String
${data[${INDEX}]}
separator=
|
max_split=-1
\
Perform a generic request using no token
@{list[${INDEX}]}
\
Perform a generic request using invalid token
@{data[${INDEX}]}
\
Perform a generic request using no token
@{list}
Request access to all resources using invalid token
[
Documentation
]
TP_MEC_MEX_ANY_001_WT
...
Check that a MEC API provider responds with an error when it
...
receives a request with an invalid token
...
ETSI GS MEC 009 1.1.1, clause 6.16.1
[
Tags
]
GENERIC_TESTS
INCLUDE_UNDEFINED_SCHEMAS
: FOR
${INDEX}
IN RANGE
0
3
\
@{list}
Split String
${data[${INDEX}]}
separator=
|
max_split=-1
\
Perform a generic request using invalid token
@{list}
*** Keywords ***
Perform a generic request using no token
[
Arguments
]
@{params}
Run Keyword If
'
@{params[
4
]}
' == "POST"
...
Perform a POST using no token
${params[0]}
${params[
1]}
${params[2]}
${params[3]}
${params[5
]}
Run Keyword If
'
@{params[
4
]}
' == "GET"
...
Perform a GET using no token
${params[0]}
${params[1]}
${params[2]}
${params[3]}
Run Keyword If
'
@{params[
4
]}
' == "DELETE"
...
Perform a DELETE using no token
${params[0]}
${params[1]}
${params[2]}
${params[3]}
Run Keyword If
'
@{params[
4
]}
' == "PUT"
...
Perform a PUT using no token
${params[0]}
${params[
1]}
${params[2]}
${params[3]}
${params[5
]}
Run Keyword If
'
@{params[
4
]}
' == "PATCH"
...
Perform a PATCH using no token
${params[0]}
${params[
1]}
${params[2]}
${params[3]}
${params[5
]}
Run Keyword If
'
@{params[
1
]}
' == "POST"
...
Perform a POST using no token
${params[0]}
${params[
2
]}
Run Keyword If
'
@{params[
1
]}
' == "GET"
...
Perform a GET using no token
${params[0]}
Run Keyword If
'
@{params[
1
]}
' == "DELETE"
...
Perform a DELETE using no token
${params[0]}
Run Keyword If
'
@{params[
1
]}
' == "PUT"
...
Perform a PUT using no token
${params[0]}
${params[
2
]}
Run Keyword If
'
@{params[
1
]}
' == "PATCH"
...
Perform a PATCH using no token
${params[0]}
${params[
2
]}
Perform a generic request using invalid token
[
Arguments
]
@{params}
Run Keyword If
'
@{params[
4
]}
' == "POST"
...
Perform a POST using invalid token
${token}
${params[0]}
${params[1]}
${params[2]}
${params[3]}
${params[5
]}
Run Keyword If
'
@{params[
4
]}
' == "GET"
...
Perform a GET using invalid token
${token}
${params[0]}
${params[1]}
${params[2]}
${params[3]}
Run Keyword If
'
@{params[
4
]}
' == "DELETE"
...
Perform a DELETE using invalid token
${token}
${params[0]}
${params[1]}
${params[2]}
${params[3]}
Run Keyword If
'
@{params[
4
]}
' == "PUT"
...
Perform a PUT using invalid token
${token}
${params[0]}
${params[1]}
${params[2]}
${params[3]}
${params[5
]}
Run Keyword If
'
@{params[
4
]}
' == "PATCH"
...
Perform a PATCH using invalid token
${token}
${params[0]}
${params[1]}
${params[2]}
${params[3]}
${params[5
]}
Run Keyword If
'
@{params[
1
]}
' == "POST"
...
Perform a POST using invalid token
${params[0]}
${params[2
]}
Run Keyword If
'
@{params[
1
]}
' == "GET"
...
Perform a GET using invalid token
${params[0]}
Run Keyword If
'
@{params[
1
]}
' == "DELETE"
...
Perform a DELETE using invalid token
${params[0]}
Run Keyword If
'
@{params[
1
]}
' == "PUT"
...
Perform a PUT using invalid token
${params[0]}
${params[2
]}
Run Keyword If
'
@{params[
1
]}
' == "PATCH"
...
Perform a PATCH using invalid token
${params[0]}
${params[2
]}
Perform a POST using no token
[
Arguments
]
${schema}
${ip}
${port}
${uri}
${payload}
[
Arguments
]
${uri}
${payload}
Log
"Running post"
Set Headers
{"Accept":"application/json"}
Set Headers
{"Content-Type":"application/json"}
POST
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
Log
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
POST
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
Log
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
${output}
=
Output
response
Should Be Equal As Strings
401
${output['status']}
Perform a GET using no token
[
Arguments
]
${schema}
${ip}
${port}
${uri}
[
Arguments
]
${uri}
Set Headers
{"Accept":"application/json"}
Set Headers
{"Content-Type":"application/json"}
Log
${
schema}
://
${ip}
:
${port
}
/
${uri}
GET
${
schema}
://
${ip}
:
${port
}
/
${uri}
Log
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
GET
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${output}
=
Output
response
Should Be Equal As Strings
401
${output['status']}
Perform a DELETE using no token
[
Arguments
]
${schema}
${ip}
${port}
${uri}
[
Arguments
]
${uri}
Set Headers
{"Accept":"application/json"}
Set Headers
{"Content-Type":"application/json"}
Log
${
schema}
://
${ip}
:
${port
}
/
${uri}
DELETE
${
schema}
://
${ip}
:
${port
}
/
${uri}
Log
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
DELETE
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${output}
=
Output
response
Should Be Equal As Strings
401
${output['status']}
Perform a PUT using no token
[
Arguments
]
${schema}
${ip}
${port}
${uri}
${payload}
=None
[
Arguments
]
${uri}
${payload}
=None
Log
"Running post"
Set Headers
{"Accept":"application/json"}
Set Headers
{"Content-Type":"application/json"}
Log
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
PUT
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
Log
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
PUT
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
${output}
=
Output
response
Should Be Equal As Strings
401
${output['status']}
Perform a PATCH using no token
[
Arguments
]
${schema}
${ip}
${port}
${uri}
${payload}
=None
[
Arguments
]
${uri}
${payload}
=None
Log
"Running post"
Set Headers
{"Accept":"application/json"}
Set Headers
{"Content-Type":"application/json"}
Log
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
PATCH
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
Log
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
PATCH
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
${output}
=
Output
response
Should Be Equal As Strings
401
${output['status']}
Perform a POST using invalid token
[
Arguments
]
${token}
${schema}
${ip}
${port}
${uri}
${payload}
=None
[
Arguments
]
${uri}
${payload}
=None
Set Headers
{"Accept":"application/json"}
Set Headers
{"Authorization":"
${token}
"}
Set Headers
{"Content-Type":"application/json"}
Log
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
POST
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
Log
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
POST
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
${output}
=
Output
response
Should Be Equal As Strings
401
${output['status']}
...
...
@@ -123,44 +130,44 @@ Perform a POST using invalid token
Perform a GET using invalid token
[
Arguments
]
${token}
${schema}
${ip}
${port}
${uri}
[
Arguments
]
${uri}
Set Headers
{"Accept":"application/json"}
Set Headers
{"Authorization":"
${token}
"}
Set Headers
{"Content-Type":"application/json"}
Log
${
schema}
://
${ip}
:
${port
}
/
${uri}
GET
${
schema}
://
${ip}
:
${port
}
/
${uri}
Log
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
GET
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${output}
=
Output
response
Should Be Equal As Strings
401
${output['status']}
Perform a DELETE using invalid token
[
Arguments
]
${token}
${schema}
${ip}
${port}
${uri}
[
Arguments
]
${uri}
Set Headers
{"Accept":"application/json"}
Set Headers
{"Authorization":"
${token}
"}
Set Headers
{"Content-Type":"application/json"}
Log
${
schema}
://
${ip}
:
${port
}
/
${uri}
DELETE
${
schema}
://
${ip}
:
${port
}
/
${uri}
Log
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
DELETE
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${output}
=
Output
response
Should Be Equal As Strings
401
${output['status']}
Perform a PUT using invalid token
[
Arguments
]
${token}
${schema}
${ip}
${port}
${uri}
${payload}
=None
[
Arguments
]
${uri}
${payload}
=None
Set Headers
{"Accept":"application/json"}
Set Headers
{"Authorization":"
${token}
"}
Set Headers
{"Content-Type":"application/json"}
Log
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
PUT
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
Log
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
PUT
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
${output}
=
Output
response
Should Be Equal As Strings
401
${output['status']}
Perform a PATCH using invalid token
[
Arguments
]
${token}
${schema}
${ip}
${port}
${uri}
${payload}
=None
[
Arguments
]
${uri}
${payload}
=None
Set Headers
{"Accept":"application/json"}
Set Headers
{"Authorization":"
${token}
"}
Set Headers
{"Content-Type":"application/json"}
Log
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
PATCH
${
schema}
://
${ip}
:
${port
}
/
${uri}
${payload}
Log
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
PATCH
${
PROVIDER_SCHEMA}
://
${PROVIDER_HOST}
:
${PROVIDER_PORT
}
/
${uri}
${payload}
${output}
=
Output
response
Should Be Equal As Strings
401
${output['status']}
MEX/ANY/environment/variables.txt
View file @
f8601eee
...
...
@@ -4,9 +4,4 @@ ${PROVIDER_SCHEMA} http
${PROVIDER_HOST} 10.192.2.172
${PROVIDER_PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiName} apmi
${apiVersion} v1
${INVALID_TOKEN} INVALID_TOKEN
\ No newline at end of file
${token} Basic YWxhZGRpbjpvcGVuc2VzYW1l
log.html
deleted
100644 → 0
View file @
0f26987f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment