Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NFV - Network Functions Virtualisation
api-tests
Commits
a0689c52
Commit
a0689c52
authored
Feb 09, 2021
by
Giacomo Bernini
Browse files
final update on use and config of auth header
parent
7405efa8
Changes
14
Hide whitespace changes
Inline
Side-by-side
SOL002/VNFIndicator-API/VNFIndicators.robot
View file @
a0689c52
...
...
@@ -203,7 +203,7 @@ Get all VNF indicators with malformed authorization token
Pass Execution If
${AUTH_USAGE}
=
= 0
Skipping test as EM/VNF is not supporting authentication
Log
The GET method queries multiple VNF indicators using invalid token
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"
Authorization
": "
${BAD_AUTHORIZATION}
"}
Set Headers
{"
${AUTHORIZATION_HEADER}
": "
${BAD_AUTHORIZATION
_TOKEN
}
"}
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/indicators
${output}
=
Output
response
...
...
@@ -213,7 +213,7 @@ Get all VNF indicators with expired or revoked authorization token
Pass Execution If
${AUTH_USAGE}
=
= 0
Skipping test as EM/VNF is not supporting authentication
Log
The GET method queries multiple VNF indicators using invalid token
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"
Authorization
":
"
${NEG_AUTHORIZATION}
"}
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${NEG_AUTHORIZATION
_TOKEN
}
"}
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/indicators
${output}
=
Output
response
...
...
SOL002/VNFIndicator-API/environment/variables.txt
View file @
a0689c52
...
...
@@ -4,8 +4,8 @@ ${PRODUCER_PORT} 8081
${PRODUCER_SCHEMA} https
${AUTHORIZATION_HEADER} Authorization
${AUTHORIZATION_TOKEN} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ=
${NEG_AUTHORIZATION} Bearer negativetoken
${BAD_AUTHORIZATION} Bear sometoken
${NEG_AUTHORIZATION
_TOKEN
} Bearer negativetoken
${BAD_AUTHORIZATION
_TOKEN
} Bear sometoken
${CONTENT_TYPE_JSON} application/json
${EM-VNF_HOST} localhost
${EM-VNF_PORT} 8002
...
...
SOL002/VNFPerformanceManagement-API/environment/variables.txt
View file @
a0689c52
...
...
@@ -10,7 +10,7 @@ ${apiName} vnfpm
${CONTENT_TYPE_JSON} application/json
${ACCEPT_JSON} application/json
${NEG_AUTHORIZATION} Bearer negativetoken
${NEG_AUTHORIZATION
_TOKEN
} Bearer negativetoken
${FIELD_USAGE} 1
${AUTHORIZATION_HEADER} Authorization
${AUTHORIZATION_TOKEN} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ
...
...
SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot
View file @
a0689c52
...
...
@@ -257,7 +257,7 @@ Get all VNF indicators with malformed authorization token
Pass Execution If
${AUTH_USAGE}
=
= 0
Skipping test as EM/VNF is not supporting authentication
Log
The GET method queries multiple VNF indicators using invalid token
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"
Authorization
": "
${BAD_AUTHORIZATION}
"}
Set Headers
{"
${AUTHORIZATION_HEADER}
": "
${BAD_AUTHORIZATION
_TOKEN
}
"}
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/indicators
${output}
=
Output
response
...
...
@@ -267,7 +267,7 @@ Get all VNF indicators with expired or revoked authorization token
Pass Execution If
${AUTH_USAGE}
=
= 0
Skipping test as EM/VNF is not supporting authentication
Log
The GET method queries multiple VNF indicators using invalid token
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"
Authorization
": "
${NEG_AUTHORIZATION}
"}
Set Headers
{"
${AUTHORIZATION_HEADER}
": "
${NEG_AUTHORIZATION
_TOKEN
}
"}
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/indicators
${output}
=
Output
response
...
...
SOL003/VNFIndicator-API/environment/variables.txt
View file @
a0689c52
...
...
@@ -5,8 +5,8 @@ ${VNFM_SCHEMA} https
${AUTHORIZATION_HEADER} Authorization
${AUTHORIZATION_TOKEN} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${NEG_AUTHORIZATION} Bearer negativetoken
${BAD_AUTHORIZATION} Bear sometoken
${NEG_AUTHORIZATION
_TOKEN
} Bearer negativetoken
${BAD_AUTHORIZATION
_TOKEN
} Bear sometoken
${ACCEPT_JSON} application/json
${AUTH_USAGE} 1
${CONTENT_TYPE_JSON} application/json
...
...
SOL003/VNFPackageManagement-API/environment/variables.txt
View file @
a0689c52
...
...
@@ -7,7 +7,7 @@ ${AUTHORIZATION_TOKEN} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${ACCEPT_JSON} application/json
${AUTH_USAGE} 1
${CONTENT_TYPE_JSON} application/json
${NEG_AUTHORIZATION} Bearer negativetoken
${NEG_AUTHORIZATION
_TOKEN
} Bearer negativetoken
${NFVO_FIELDS} 1
${vnfPackageId} 788106a2-d692-44f3-a86d-384f0ce35e42
...
...
SOL003/VNFPerformanceManagement-API/environment/variables.txt
View file @
a0689c52
...
...
@@ -5,7 +5,7 @@ ${VNFM_SCHEMA} https
${AUTHORIZATION_HEADER} Authorization
${AUTHORIZATION_TOKEN} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${NEG_AUTHORIZATION} Bearer negativetoken
${NEG_AUTHORIZATION
_TOKEN
} Bearer negativetoken
${CONTENT_TYPE_JSON} application/json
${ACCEPT_JSON} application/json
...
...
SOL005/NSDManagement-API/NSDManagementKeywords.robot
View file @
a0689c52
...
...
@@ -49,7 +49,7 @@ Get all Network Service Descriptors Information with malformed authorization tok
Pass Execution If
${AUTH_USAGE}
=
= 0
Skipping test as NFVO is not supporting authentication
Log
The GET method queries using invalid token
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"
Authorization
": "
${BAD_AUTHORIZATION}
"}
Set Headers
{"
${AUTHORIZATION_HEADER}
": "
${BAD_AUTHORIZATION
_TOKEN
}
"}
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/ns_descriptors
${output}
=
Output
response
...
...
@@ -68,7 +68,7 @@ Get all Network Service Descriptors Information with expired or revoked authoriz
Pass Execution If
${AUTH_USAGE}
=
= 0
Skipping test as it is not supporting authentication
Log
The GET method queries
using invalid token
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"
Authorization
": "
${NEG_AUTHORIZATION}
"}
Set Headers
{"
${AUTHORIZATION_HEADER}
": "
${NEG_AUTHORIZATION
_TOKEN
}
"}
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/ns_descriptors
${output}
=
Output
response
...
...
@@ -1049,4 +1049,4 @@ Check PostCondition GET Individual Network Service Descriptor Information
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Run Keyword If
${AUTH_USAGE}
=
= 1
Set Headers
{"
${AUTHORIZATION_HEADER}
":"
${AUTHORIZATION_TOKEN}
"}
GET
${apiRoot}
/
${apiName}
/
${apiVersion}
/ns_descriptors/
${nsdInfoId}
Should Be Equal As Strings
${response['status']}
200
\ No newline at end of file
Should Be Equal As Strings
${response['status']}
200
SOL005/NSDManagement-API/environment/nsDescriptors.txt
View file @
a0689c52
...
...
@@ -22,8 +22,8 @@ ${onboardingStateNsdInfoId} b992a851-08b1-45a8-9282-a5f7a7df04a6
${contentZipFile} files/nsdContent.zip
${contentPlainFile} files/nsdContent.yaml
${creatingNsdInfoId} 71241932-994a-46e2-ad6c-1740674dda44
${NEG_AUTHORIZATION} Bearer negativetoken
${BAD_AUTHORIZATION} Bear sometoken
${NEG_AUTHORIZATION
_TOKEN
} Bearer negativetoken
${BAD_AUTHORIZATION
_TOKEN
} Bear sometoken
${original_etag} 1234
${wrong_etag} abcd
${usageState} state
...
...
@@ -31,4 +31,4 @@ ${length} 1024
${createdNsdInfoId} f27200b1-1d8b-48c2-9d98-a993b8ab117f
${NSD_NAME} nsdName=onBoardedNSD
${PNFD_NAME} pnfdName=onBoardedPNFD
${SEPERATOR} =
\ No newline at end of file
${SEPERATOR} =
SOL005/NSDManagement-API/environment/variables.txt
View file @
a0689c52
...
...
@@ -8,7 +8,7 @@ ${CONTENT_TYPE_JSON} application/json
${ACCEPT_JSON} application/json
${apiRoot} /
${AUTH_USAGE} 1
${NEG_AUTHORIZATION} Bearer negativetoken
${NEG_AUTHORIZATION
_TOKEN
} Bearer negativetoken
${apiVersion} v1
${apiName} nsd
${FIELD_USAGE} 1
...
...
SOL005/NSPerformanceManagement-API/environment/variables.txt
View file @
a0689c52
...
...
@@ -8,7 +8,7 @@ ${CONTENT_TYPE_JSON} application/json
${ACCEPT_JSON} application/json
${apiRoot} /
${AUTH_USAGE} 1
${NEG_AUTHORIZATION} Bearer negativetoken
${NEG_AUTHORIZATION
_TOKEN
} Bearer negativetoken
${apiVersion} v1
${apiName} nspm
${FIELD_USAGE} 1
...
...
SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot
View file @
a0689c52
...
...
@@ -77,7 +77,7 @@ Get all VNF Packages with malformed authorization token
Pass Execution If
${AUTH_USAGE}
=
= 0
Skipping test as NFVO is not supporting authentication
Log
The GET method queries using invalid token
Set Headers
{"Accept": "
${ACCEPT_JSON}
"}
Set Headers
{"
Authorization
": "
${BAD_AUTHORIZATION}
"}
Set Headers
{"
${AUTHORIZATION_HEADER}
": "
${BAD_AUTHORIZATION
_TOKEN
}
"}
Log
Execute Query and validate response
Get
${apiRoot}
/
${apiName}
/
${apiVersion}
/vnf_packages
${output}
=
Output
response
...
...
SOL005/VNFPackageManagement-API/environment/variables.txt
View file @
a0689c52
...
...
@@ -9,7 +9,7 @@ ${CONTENT_TYPE_JSON} application/json
${ACCEPT_JSON} application/json
${apiRoot} /
${AUTH_USAGE} 1
${NEG_AUTHORIZATION} Bearer negativetoken
${NEG_AUTHORIZATION
_TOKEN
} Bearer negativetoken
${apiVersion} v1
${apiName} vnfpkgm
${FIELD_USAGE} 1
...
...
SOL005/VNFPackageManagement-API/environment/vnfPackages.txt
View file @
a0689c52
...
...
@@ -4,7 +4,7 @@ ${NEG_FILTER} nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Negative case,
${CAN_FILTER} 1 # NFVO in able to use filters when retrieving VNF Packages
${fields} softwareImages,additionalArtifacts
${response} httpresponse
${NEG_AUTHORIZATION} Bearer negativetoken
${BAD_AUTHORIZATION} Bear sometoken
${NEG_AUTHORIZATION
_TOKEN
} Bearer negativetoken
${BAD_AUTHORIZATION
_TOKEN
} Bear sometoken
${SEPERATOR} =
${VAR_SEPERATOR} &
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