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

Add disk_format kuttl tests #518

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

maximsava12
Copy link

This patch introduces kuttl tests to check the resources that are supposed to be generated when the disk_format is defined.

This patch introduces kuttl tests to check the resources that are
supposed to be generated when the disk_format is defined.
Copy link
Contributor

openshift-ci bot commented Apr 21, 2024

Hi @maximsava12. Thanks for your PR.

I'm waiting for a openstack-k8s-operators member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@maximsava12 maximsava12 marked this pull request as ready for review April 21, 2024 18:30
@fmount
Copy link
Contributor

fmount commented Apr 22, 2024

This should be rebased at least on top of #520, so we'll test it once the dependencies are in place.

This patch introduces kuttl tests to check the resources that are
supposed to be generated when the disk_format is defined.
This patch introduces kuttl tests to check the resources that are
supposed to be generated when the disk_format is defined.
This patch introduces kuttl tests to check the resources that are
supposed to be generated when the disk_format is defined.
config/samples/disk_formats/create-image.sh Outdated Show resolved Hide resolved
config/samples/disk_formats/create-image.sh Outdated Show resolved Hide resolved
config/samples/disk_formats/create-image.sh Outdated Show resolved Hide resolved
config/samples/disk_formats/create-image.sh Outdated Show resolved Hide resolved
config/samples/disk_formats/create-image.sh Outdated Show resolved Hide resolved
config/samples/disk_formats/create-image.sh Outdated Show resolved Hide resolved
This patch introduces kuttl tests to check the resources that are
supposed to be generated when the disk_format is defined.
Copy link
Contributor

openshift-ci bot commented May 6, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: maximsava12
Once this PR has been reviewed and has the lgtm label, please ask for approval from fmount. 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

Copy link
Contributor

@fmount fmount left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made another pass and I think we're going to the right path. It will be something we can test and merge after a few minor changes

config/samples/disk_formats/create-image.sh Outdated Show resolved Hide resolved
kind: TestStep
commands:
- script: |
oc kustomize ../../../../config/samples/layout/single | oc apply -n $NAMESPACE -f -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line (L5), and instead change config/samples/disk_format/disk_format.yaml to be like the following:

# Inject inject_metadata config
apiVersion: glance.openstack.org/v1beta1
kind: Glance
metadata:
  name: glance
spec:
  serviceUser: glance
  databaseInstance: openstack
  databaseAccount: glance
  keystoneEndpoint: default
  customServiceConfig: |
    [image_format]
    disk_formats=raw,iso
  glanceAPIs:
    default:
      type: single
      replicas: 1

This way you can directly deploy what you need with a single command.
Also, given this layout covers a kuttl test, can we move disk_format under layout folder?

kind: TestStep
commands:
- script: |
oc kustomize ../../../../config/samples/layout/single | oc delete -n $NAMESPACE -f -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L5 here can be changed to be:

oc kustomize ../../../../config/samples/layout/disk_format | oc delete -n $NAMESPACE -f -

after you move everything under layout directory.

kind: TestStep
commands:
- command: |
oc -n $NAMESPACE exec -it openstackclient --stdin=false -- /bin/sh -c "DOMAIN=glance-default-single.$NAMESPACE.svc ./scripts/create-image.sh raw"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the script I think you don't need "DOMAIN=glance-default-single.$NAMESPACE.svc.
Remove it from L5 and L7.

maximsava12 and others added 3 commits August 15, 2024 09:45
This patch introduces kuttl tests to check the resources that are
supposed to be generated when the disk_format is defined.
This patch introduces kuttl tests to check the resources that are
supposed to be generated when the disk_format is defined.
@fmount
Copy link
Contributor

fmount commented Oct 1, 2024

/ok-to-test

Copy link
Contributor

openshift-ci bot commented Oct 1, 2024

@maximsava12: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/precommit-check 119dc0f link true /test precommit-check
ci/prow/glance-operator-build-deploy-kuttl 119dc0f link true /test glance-operator-build-deploy-kuttl

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

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

Successfully merging this pull request may close these issues.

2 participants