kubernetes-sigs / kubetest2

Kubetest2 is the framework for launching and running end-to-end tests on Kubernetes.
Apache License 2.0
331 stars 106 forks source link

How to narrow down target test cases #257

Closed YuikoTakada closed 6 months ago

YuikoTakada commented 8 months ago

I am trying to make fixes in kubelet in a locally built kubernetes and I want to execute e2e tests for kubelet. I use kind to make local clusters and I have been considering using kubetest2 using below command:

kubetest2-kind -v 2 --kube-root $GOPATH/src/k8s.io/kubernetes \
 --config cluster.yaml \
 --build \
 --up \
 --down \
 --test=ginkgo

But it takes over 7 hours, it's too long. So, is there any option to filter test cases(i.e. kubelet e2e tests only)?

Thank you.

jbpratt commented 6 months ago

hey @YuikoTakada , you can pass the --focus-regex and --skip-regex flags down like this:

https://github.com/kubernetes-sigs/kubetest2/blob/bcfe5d638d28a621254e53d159c04874694cbc0b/kubetest2-gce/ci-tests/buildupdown.sh#L60-L64

feel free to reopen this if you have an issues with it!

/close

k8s-ci-robot commented 6 months ago

@jbpratt: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/kubetest2/issues/257#issuecomment-1986772438): >hey @YuikoTakada , you can pass the `--focus-regex` and `--skip-regex` flags down like this: > >https://github.com/kubernetes-sigs/kubetest2/blob/bcfe5d638d28a621254e53d159c04874694cbc0b/kubetest2-gce/ci-tests/buildupdown.sh#L60-L64 > >feel free to reopen this if you have an issues with it! > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.