Skip to content

Commit

Permalink
contrib/test/int/e2e: rework "skip" regex
Browse files Browse the repository at this point in the history
In its current form, it is very hard to read, maintain, or make any
sense out of.

Play with ansible/jinja a bit to enable much simpler way to list
the tests to skip.

The downside is we have to play some tricks to create a regular
expression:

 1. join the elements of skip_tests via |
 2. replace spaces with \\s
 3. prepend square brackets and parentheses with \\

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Nov 18, 2020
1 parent 5e57f42 commit fd15db0
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions contrib/test/integration/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,32 @@
state: present
value: 1048576

# TODO remove the last six tests once the newtworking issue with AWS is figured out https://github.com/cri-o/cri-o/issues/1529
- name: Buffer the e2e testing command to workaround Ansible YAML folding "feature"
vars:
skip_tests:
- "[Slow]"
- "[Serial]"
- "[Disruptive]"
- "[Flaky]"
- "[Feature:"
- "[sig-instrumentation] MetricsGrabber"
- "for NodePort service"
- "In-tree Volumes [Driver: local]"
- "PersistentVolumes-local"
- "CSI Volumes [Driver: csi-hostpath] [Testpattern: Dynamic PV (block volmode)] provisioning should provision storage with pvc data source"
- "CSI Volumes [Driver: csi-hostpath] [Testpattern: Dynamic PV (block volmode)] volumes should store data"
set_fact:
e2e_shell_cmd: >
DBUS_SESSION_BUS_ADDRESS="unix:path=/var/run/dbus/system_bus_socket" KUBE_CONTAINER_RUNTIME="remote" GINKGO_TOLERATE_FLAKES="y" GINKGO_PARALLEL_NODES=6 GINKGO_PARALLEL=y KUBE_SSH_USER="{{ ssh_user }}" LOCAL_SSH_KEY="{{ ssh_location }}"
"{{ ansible_env.GOPATH }}"/bin/kubetest
--provider=local
--test
--test_args="-host=https://{{ ansible_default_ipv4.address }}:6443
--ginkgo.skip=\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|PersistentVolumes|\[HPA\]|should.support.building.a.client.with.a.CSR|should.propagate.mounts.to.the.host|for.NodePort.service|type.clusterIP|unready.pods|ExternalName.services|Guestbook.application|in-cluster.config|Pods.should.support.pod.readiness.gates|\[sig-storage\].In-tree.Volumes.\[Driver:.local\]|\[sig-storage\].CSI.Volumes.CSI.Topology.test.using.GCE.PD.driver|\[sig\-storage\]\sCSI\sVolumes\s\[Driver\:\scsi\-hostpath\]\s\[Testpattern\:\sDynamic\sPV\s\(block\svolmode\)\]\svolumes\sshould\sstore\sdata|\[sig\-storage\]\sCSI\sVolumes\s\[Driver\:\scsi\-hostpath\]\s\[Testpattern\:\sDynamic\sPV\s\(block\svolmode\)\]\sprovisioning\sshould\sprovision\sstorage\swith\spvc\sdata\ssource|\[sig-network\]\sServices\sshould\sbe\sable\sto\spreserve\sUDP\straffic\swhen\sserver\spod\scycles\sfor\sa\sNodePort\sservice|Events.should.be.sent.by.kubelets.and.the.scheduler.about.pods.scheduling.and.running|\[sig\-apps\].DisruptionController.should.block.an.eviction.until.the.PDB.is.updated.to.allow.it|\[sig\-instrumentation\].MetricsGrabber
--ginkgo.skip={{ skip_tests | join('|') | replace(' ', '\\s') | regex_replace('([][)(])', '\\\\\1') }}
--ginkgo.noColor
--ginkgo.succinct
--report-dir={{ artifacts }}"
&> {{ artifacts }}/e2e.log
# Fix vim syntax highlighting: "
- block:

Expand Down

0 comments on commit fd15db0

Please sign in to comment.