Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Schema
Commits
b6635082
Commit
b6635082
authored
Nov 09, 2020
by
Aman Verma
Committed by
Hema Vishnu Pola [Microsoft]
Nov 09, 2020
Browse files
updating the "no auth header" related integration test
parent
ee957a1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
b6635082
...
...
@@ -15,7 +15,6 @@ variables:
AZURE_SERVICE
:
schema
AZURE_BUILD_SUBDIR
:
provider/schema-azure
AZURE_TEST_SUBDIR
:
testing/schema-test-core
AZURE_SKIP_TEST
:
'
true'
AZURE_DEPLOYMENTS_SUBDIR
:
deployments/scripts/azure
INTEGRATION_TESTER
:
$AZURE_PRINCIPAL_ID
AZURE_TESTER_SERVICEPRINCIPAL_SECRET
:
$AZURE_PRINCIPAL_SECRET
...
...
testing/schema-test-core/src/test/java/org/opengroup/osdu/schema/stepdefs/SchemaServiceStepDef_GET.java
View file @
b6635082
package
org.opengroup.osdu.schema.stepdefs
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.io.IOException
;
import
java.util.ArrayList
;
...
...
@@ -303,6 +304,15 @@ public class SchemaServiceStepDef_GET implements En {
}
});
Then
(
"Then service should respond back with status code {string} or {string}"
,
(
String
ResponseStatusCode
,
String
AlternateStatusCode
)
->
{
HttpResponse
response
=
this
.
context
.
getHttpResponse
();
if
(
response
!=
null
)
{
assertTrue
(
ResponseStatusCode
.
equals
(
String
.
valueOf
(
response
.
getCode
()))
||
AlternateStatusCode
.
equals
(
String
.
valueOf
(
response
.
getCode
())));
}
});
}
private
void
verifyGetListResponse
(
String
parameter
,
String
parameterVal
)
throws
IOException
{
...
...
testing/schema-test-core/src/test/resources/features/IntegrationTest_SchemaService_GET.feature
View file @
b6635082
...
...
@@ -23,12 +23,12 @@ Feature: To verify functionality of GET schema Service
Scenario Outline
:
Verify that Schema Service's GET list API throws correct exception if mandatory headers are blank in request header
#Given I hit schema service GET List API with <parameter> and <value> having blank <header>
Given
I hit schema service GET API with blank
<header>
Then
service should respond back with
error
<ReponseStatusCode>
and
<ResponseMessag
e>
Then
service should respond back with
status code
<Re
s
ponseStatusCode>
or
<AlternateStatusCod
e>
Examples
:
|
ReponseStatusCode
|
ResponseMessage
|
header
|
|
"401"
|
"/output_payloads/SchemaGet_MissingAuthorization.json"
|
"authorization"
|
|
"401"
|
"/output_payloads/SchemaGet_MissingDataPartitionId.json"
|
"data-partition-id"
|
|
Re
s
ponseStatusCode
|
ResponseMessage
|
header
|
AlternateStatusCode
|
|
"401"
|
"/output_payloads/SchemaGet_MissingAuthorization.json"
|
"authorization"
|
"403"
|
|
"401"
|
"/output_payloads/SchemaGet_MissingDataPartitionId.json"
|
"data-partition-id"
|
"401"
|
@SchemaService
Scenario Outline
:
Verify that Schema Service's GET list API returns list of schema all scopes
...
...
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