Skip to content

Create registry index server mock testing #813

Closed
devfile/registry-support
#130
@michael-valdron

Description

@michael-valdron

Which area this feature is related to?

/area registry

Which functionality do you think we should add?

Why is this needed? Is your feature request related to a problem?

Allows testing of registry index server using a mock environment without the need for full deployment to sandbox environment.

Detailed description:

Currently, testing the registry index server requires one to build and deploy the index server to a sandbox environment to run integration testing. With mock testing, this would save a lot of time when one might be working endpoints and need to perform testing.

Describe the solution you'd like

  • Creation of tests for each endpoint of the index server
    • GET /index
    • GET /index/:type
    • GET /health
    • GET /devfiles/:name
    • GET /devfiles/:name/:version
    • GET /devfiles/:name/starter-projects/:starterProjectName
    • GET /devfiles/:name/:version/starter-projects/:starterProjectName
    • GET /v2index
    • GET /v2index/:type
    • GET /v2/*proxyPath
    • HEAD /v2/*proxyPath
  • Creates mock OCI registry server that index server talks to
  • Creates mock client connection to perform fake requests on the endpoints
  • Uses form of filesystem environment to simulate file IO done by endpoints
  • Update testing documentation to include mock testing
    • Instructions on changing mock testing when changes are made to Registry Index Server or OCI Registry Server

Describe alternatives you've considered

Continue with current testing setup as is.

Target Date: 08-23-2022

Metadata

Metadata

Labels

area/registryDevfile registry for stacks and infrastructure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions