Skip to content

Commit 13c9ef7

Browse files
committed
test: Fix CRD conversion failures
The current testing script immediately continues to run tests after all required operators are installed. This can lead to CRD conversion failures because all resources (this includes custom ones) are applied by kuttl immediately after. All custom resources (SecretClasses in this case) use v1alpha1 (to additionally test the conversion) and as such cannot be converted to the stored v1alpha2 version when the conversion webhook is not running yet. To remedy this, a 10 second wait is introduced after the operator installation. A far better solution is to wait for a Kubernetes status condition, but that is more involved. I would like to stop bolting on functionality to the test script and instead move these features into our new (hopefully coming soon) tooling.
1 parent 5ec590c commit 13c9ef7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

scripts/run-tests

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import shutil
1111
import subprocess
1212
import sys
1313
import tempfile
14+
import time
1415

1516
__version__ = "0.0.1"
1617

@@ -437,6 +438,7 @@ def main(argv) -> int:
437438
gen_tests(opts.test_suite, opts.namespace, opts.work_dir)
438439
with release_file(opts.operator, opts.skip_operator) as f:
439440
maybe_install_release(opts.skip_release, f)
441+
time.sleep(10)
440442
if opts.skip_tests:
441443
logging.info("Skip running tests.")
442444
else:

0 commit comments

Comments
 (0)