https://github.com/cilium/cilium
Revision 9d4e99d500d0371bc5f42125d6c6772c387a7721 authored by Quentin Monnet on 23 June 2021, 14:25:47 UTC, committed by André Martins on 28 June 2021, 23:12:58 UTC
The AfterAll() and AfterEach() blocks in the test file for custom calls
run everytime, even if the Context block for the actual tests is
skipped. In that case, running the final blocks results in an attempt to
remove deployments that have never been set up in the first place. This
may lead to the blocks failing when the tests were in fact skipped, and
may produce test artifacts even though Jenkins does not considered the
test failed.

Let's reorganise those blocks, to make sure they are called only when
necessary. Note that we do need to keep both DeleteCilium() and
DeleteAll(), even if they are now in the same block, as calling only
DeleteAll() would not remove the Cilium ConfigMap.

Fixes: 37f6192c9e77 ("test: add CI test for tail calls hooks for custom programs")
Fixes: #13191
Fixes: #16633

Reported-by: Paul Chaignon <paul@cilium.io>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
1 parent d1a3b70
History
Tip revision: 9d4e99d500d0371bc5f42125d6c6772c387a7721 authored by Quentin Monnet on 23 June 2021, 14:25:47 UTC
tests: rework custom calls's AfterEach/AfterAll blocks to skip if needed
Tip revision: 9d4e99d
File Mode Size
.github
.travis
Documentation
api
bpf
bugtool
cilium
cilium-health
clustermesh-apiserver
contrib
daemon
envoy
examples
hack
hubble-relay
images
install
jenkinsfiles
operator
pkg
plugins
proxylib
test
tests
tools
vendor
.authors.aux -rw-r--r-- 416 bytes
.gitattributes -rw-r--r-- 260 bytes
.gitignore -rw-r--r-- 1.5 KB
.gitmodules -rw-r--r-- 0 bytes
.golangci.yaml -rw-r--r-- 3.3 KB
.mailmap -rw-r--r-- 3.5 KB
.travis.yml -rw-r--r-- 1.1 KB
AUTHORS -rw-r--r-- 18.8 KB
CODEOWNERS -rw-r--r-- 12.5 KB
CODE_OF_CONDUCT.md -rw-r--r-- 2.2 KB
CONTRIBUTING.md -rw-r--r-- 227 bytes
FURTHER_READINGS.rst -rw-r--r-- 4.9 KB
GO_VERSION -rw-r--r-- 7 bytes
LICENSE -rw-r--r-- 11.1 KB
MAINTAINERS.md -rw-r--r-- 3.6 KB
Makefile -rw-r--r-- 27.6 KB
Makefile.defs -rw-r--r-- 6.0 KB
Makefile.docker -rw-r--r-- 6.1 KB
Makefile.quiet -rw-r--r-- 718 bytes
README.rst -rw-r--r-- 15.1 KB
SECURITY.md -rw-r--r-- 615 bytes
USERS.md -rw-r--r-- 7.0 KB
VERSION -rw-r--r-- 8 bytes
Vagrantfile -rw-r--r-- 12.8 KB
go.mod -rw-r--r-- 5.4 KB
go.sum -rw-r--r-- 140.2 KB
netlify.toml -rw-r--r-- 92 bytes
stable.txt -rw-r--r-- 8 bytes
vagrant_box_defaults.rb -rw-r--r-- 392 bytes

README.rst

back to top