Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • S Schema
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Open Subsurface Data Universe SoftwareOpen Subsurface Data Universe Software
  • Platform
  • System
  • Schema
  • Issues
  • #18
Closed
Open
Issue created Aug 24, 2020 by Rucha Deshpande@deshruchMaintainer

[Schema Service] Integration test issue (PUT api)

Scenario Outline: Verify that Schema Service's PUT API registers authority, source, entity and creates a private schema correctly with $ref attribute

Given I hit schema service PUT API with "/input_payloads/postSchemaServiceWithRef_positiveScenario.json", data-partition-id as "COMMON" Then service should respond back with "200" and "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" and scope whould be "SHARED"

Expected Result: 200

Actual Result: 400

{
    "error": {
        "code": 400,
        "message": "Schema Id is already present",
        "errors": [
            {
                "domain": "global",
                "reason": "badRequest",
                "message": "Schema Id is already present"
            }
        ]
    }
}

Reason:

The test case's input payload passes a Major and Minor version that does not exist in (SHARED_TENANT)"common", but exists in PRIVATE_TENANT1(opendes).

Details:

Since it does not exist in "common", it throws a "NoSchemaFoundException" resulting in "create schema" code being called which checks for uniqueness of the id. The isUnique returns false since the id exists for PRIVATE_TENANT1 resulting in a 400 error.

Solution:

In SchemaServiceStepDef_PUT.java In, Given("I hit schema service PUT API with {string}, data-partition-id as {string}", an existing Major and Minor version belonging to "common" must be set to test the PUT functionality

Assignee
Assign to
Time tracking