Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: index server shouldn't return null if no samples exist #540 #233

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Horiodino
Copy link

Please specify the area for this PR

What does does this PR do / why we need it:

Which issue(s) this PR fixes:

Fixes #devfile/api#540

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?

Documentation (WIP)

How to test changes / Special notes to the reviewer: uncertain for now!

@openshift-ci openshift-ci bot requested review from elsony and thepetk April 15, 2024 16:07
Copy link

openshift-ci bot commented Apr 15, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Horiodino
Once this PR has been reviewed and has the lgtm label, please assign jdubrick for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot
Copy link

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Horiodino
Copy link
Author

Horiodino commented Apr 15, 2024

i tried building the image , build sucessfully both the index-server-base and the devfile-index usingbuild_registry.sh but not getting how i can test it , need some help here , oh sorry for the signoff i will fix it

@michael-valdron
Copy link
Member

michael-valdron commented Apr 16, 2024

@Horiodino Thanks for your contribution!

build sucessfully both the index-server-base and the devfile-index usingbuild_registry.sh but not getting how i can test it

You can test using both the unit tests and the integration tests. For the unit test, this can be done by running cd index/server && go test ./..., more information here.

For integration tests, you'll first need to deploy your built image to an environment like minikube then you can build and run the integration test suite against the deployed registry, here are some steps:

  1. Use one of the deployment methods to deploy your image, I'd suggest the helm chart, if you don't have helm installed you can do so by following the user guide, the following is an example of helm usage for this case:
helm install devfile-registry ./deploy/chart/devfile-registry \
  --set global.ingress.domain="$(minikube ip).nip.io" \
  --set devfileIndex.image=<your_image_name> \
  --set devfileIndex.tag=<your_image_tag>
  1. Build the integration test suite image:
# Change your pwd to 'tests/integration' subdirectory
cd tests/integration

# Execute the build script
bash docker-build.sh
  1. Run the integration test suite against your target registry using docker:
# Set your target registry to be your local deployments ingress address
export REGISTRY="http://devfile-registry-<deployment_namespace>.$(minikube ip).nip.io"

# Run test cases using docker
docker run --env REGISTRY=$REGISTRY --env IS_TEST_REGISTRY=true devfile-registry-integration

Note: You can also use your deployment directly to test your change out manually.

I will also be running these tests during my review.

oh sorry for the signoff i will fix it

No problem, will also ask you to rebase your branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants