aboutsummaryrefslogtreecommitdiffstats
path: root/functest_kubernetes/k8stest.py
AgeCommit message (Collapse)AuthorFilesLines
2023-12-22Help Debugging when e2e result parsing failsCédric Ollivier1-4/+11
Change-Id: I7f153b0ddef25b0317d8e9a8b2dad55ab580b388 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit da0f27e6cc0a416e3a3a89639b7280836daf296d)
2023-12-05k8s.gcr.io -> registry.k8s.ioCédric Ollivier1-1/+1
https://kubernetes.io/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/ https://kubernetes.io/blog/2023/03/10/image-registry-redirect/ Change-Id: Ibae7149b6da15aa18f536d9ffdf09d155b591692 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 4f21ac9faf95be6216ddb2b564a6ca4fc6e3f53c)
2023-12-01Remove now falsy true in ginkgo call.Cédric Ollivier1-1/+1
Change-Id: I02b8984a5bbd13cd89e6118b1c0cf7b5c04e0fba Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit f1b5820fbc8cd8cb069e97546ec869b7498b41d6)
2023-01-23Fix letter is lowercase in repositories.ymlCédric Ollivier1-12/+12
Co-authored-by: Peter Pongracz <peter.1.pongracz@nokia.com> Change-Id: I78be8192239cad58b25449c106da3e1f558bf13b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2022-10-21Use Path.home() instead of ~Cédric Ollivier1-1/+2
Change-Id: I5863f4e0315b67a07dab4756857dba7aa37932f0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2022-10-21Stop hardcoding KUBECONFIGCédric Ollivier1-1/+1
Change-Id: I6ac15eb3686d6502dfa1bbe179622693b1961f45 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2022-09-30Replace -noColor by --no-colorCédric Ollivier1-1/+1
--noColor is deprecated, use --no-color instead Learn more at: https://onsi.github.io/ginkgo/MIGRATING_TO_V2#changed-command-line-flags Change-Id: I31d17fda3138a59bba65c1ad8155c07d6b05a828 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-11-15Update linters and fix all new issuesCédric Ollivier1-22/+20
It mostly adds encoding in open calls and leverages f-strings. It removes ansible-lint as it now asks for ansible, roles and collections. Change-Id: I3ef729f44b2c721b14d19df27805938298aa2c67 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-10-05Set defaut provider to local backCédric Ollivier1-2/+3
It apply the same rules as sonuoboy. Any user is free to set skeleton or something else via testcases.yml. Change-Id: Id999dfd5fbcf9bde9430e0f35c63c41e80c8044f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-09-11Set encoding utf-8 when opening fileCédric Ollivier1-2/+4
Change-Id: I4e756552173247499ba882bfee4fbe8738fbae3d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-08-18Update to Alpine 3.14Cédric Ollivier1-4/+5
It also disabled wrong order check as it fails vs kubernetes amongst others. [1] https://github.com/PyCQA/pylint/issues/2175 Change-Id: I3d641c213067428848212a148d25d78051c5674f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-06-20Allow passing extra opts to e2e.testCédric Ollivier1-0/+12
E2E_TEST_OPTS now allows setting runtime opts. For instance, Functest K8s gates ask for -container-runtime containerd Change-Id: I4f6e1caf57590b16d0c01324dadb040f67f3cee4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-04-02Properly manage e2e parallel testingCédric Ollivier1-5/+7
It sets nodes=25 to run all tests in parallel. It also beautifies all testcases.yml Change-Id: I3ecd8899e957c0efbef34ab0409c2b4d557c9425 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-04-02Rather use skeleton instead of localCédric Ollivier1-1/+1
“skeleton”: cluster is accessed via the Kubernetes API and nothing else. https://kubernetes.io/blog/2019/03/22/kubernetes-end-to-end-testing-for-everyone/ Change-Id: Iea8b65b2ac55d40572c0078b7a9a956d1c54d62a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-03-25 Provide support for air gapped env for e2eSylvain Desbureaux1-0/+35
Sometimes, tested Kubernetes doesn't have direct access to Internet but access through repository mirrors. This patch handles this case for e2e test case. Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: Iaa2960ad03aae1fff859d41bcd6ddf3176658f8e
2021-01-25Export GINKGO_PARALLEL=yCédric Ollivier1-1/+3
It would speedup the testing. Change-Id: I084bcf0d44a060f65eb9549eab8dcbbf5a4cc9d5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-09-10Allow setting e2e non blocking taints via env varsCédric Ollivier1-0/+3
Change-Id: I8132769ea23a376b2cae8b93beed27f5e66b9207 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-09-06Slightly generalize ginkgo paramsCédric Ollivier1-4/+2
Change-Id: I51b013056bb5b88ef2e1de31e9171129e8ce4475 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-08-17Safely decode e2e.test outputCédric Ollivier1-2/+4
https://build.opnfv.org/ci/job/functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-arm-latest-k8s_smoke-run/2/console Change-Id: I57f3ae0051fb55c8c80de81e79168e61c06d85bb Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-08-13Ease modifying the test list in E2E testingCédric Ollivier1-31/+11
It eases creating specific CNTT test cases based on K8s E2E testing. Change-Id: I304960fda760ffc47d763d53511898699f63e356 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-16Correctly override dir_results and res_dirCédric Ollivier1-2/+2
Both have to be modified else publishing artifacts fails [1]. [1] https://build.opnfv.org/ci/job/functest-kubernetes-opnfv-functest-kubernetes-smoke-latest-xrally_kubernetes-run/139/console Change-Id: Ieefee6a9a61452bb4f23d40f75b60280803cd215 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-10Update to Xtesting 0.82Cédric Ollivier1-0/+3
It overrides the default log files. Change-Id: I6a1f9951b47b761e4e1832140181a57dd886117c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-06-28Rewrite kubernetes parsingCédric Ollivier1-51/+20
It now sets details and result thanks to 1 regex. It also prints the failure summary if needed. Change-Id: Ia89d6825134161cf6513924dac93281d677eada6 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-06-27Disable log dumpCédric Ollivier1-3/+7
It avoids dumping logs at the end which requires gcloud configured (CI). Then it partially reverts "Keep kubernetes sources" [1]. It now dumps e2e.test output in e2e.log as sonobuoy [2]. [1] https://gerrit.opnfv.org/gerrit/68106 [2] https://raw.githubusercontent.com/cncf/k8s-conformance/master/v1.15/kubeadm/e2e.log Change-Id: I400e1cf92a8540eba3d40db1ed4237628921efe6 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-05-25Set utf-8 in decode and encode callsCédric Ollivier1-1/+1
It eases backporting in iruya and hunter as a few logs can't be decoded as ascii [1]. [1] https://build.opnfv.org/ci/job/functest-opnfv-functest-vnf-iruya-juju_epc-run/56/console Change-Id: If241c5323f286c33aaae804479375efe4c3c1588 Signed-off-by: Cédric Ollivier <ollivier.cedric@gmail.com>
2019-05-12Update to Python3Cédric Ollivier1-1/+1
Functest containers leverage on Python3 instead of python2. https://mail.python.org/pipermail/python-dev/2018-March/152348.html Change-Id: I4f148e91259377b4e3b9076621f192a6e00f6009 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-03-10Publish Junit files and fix Conformance regexCédric Ollivier1-4/+8
It fixes Conformance to [Conformance] and add the skips test regex. It now conforms with Kubernetes Certification (see Sunobuoy) Change-Id: Ic25bb72c839810cf41668a3a8b86579a3fd59629 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-10-10Set Ginkgo's reporter not to print out in colorJuha Kosonen1-6/+5
Change-Id: If0ef89ba521d02b5ea1a1fcb5bc3e546f93e2859 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-08-31Fully remove kubernetes working dirCédric Ollivier1-4/+2
It hugely decreases the size of our containers. Change-Id: I7bdc31645fb00c01e16855795bf99dd1b3b17dfd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-31Remove useless env varsCédric Ollivier1-17/+6
In OPNFV context, provider is always local. Change-Id: Ieb51153bedfec34c0a3dfba9705b0b2afcebb8c2 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-05-21Fix functest-k8s logging to log all k8s testsKonrad Djimeli1-6/+13
JIRA: FUNCTEST-967 Change-Id: If4924a5c6d66dcbda48ac5ea80d67fcef11ba40a Signed-off-by: Konrad Djimeli <konraddjimeli@gmail.com>
2018-04-26Update logging to log Errors, when they occurKonrad Djimeli1-0/+2
Enable logging of errors which can occur due to incorrect configfile, wrong KUBE_MASTER_URL or KUBE_MASTER_IP etc. Change-Id: I352ed0ab0376e9392d205decdc569bac6304ba27 Signed-off-by: Konrad Djimeli <konraddjimeli@gmail.com>
2018-04-09Add unit test for config file validationKonrad Djimeli1-1/+1
Change-Id: I170de36f9641fce253acdd169061476443b86f81 Signed-off-by: Konrad Djimeli <konraddjimeli@gmail.com>
2018-03-21Remove KUBECONFIG from env varsLinda Wang1-11/+12
Change-Id: I85f4c01ceaf9cdadff7fe3d0f284f28da5727658 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2018-03-13Refactor loggersCédric Ollivier1-16/+15
Only 1 logger is needed and it's updated to conform with logging.ini. Change-Id: I53465bbe9a81526ce1acaac90e47ffe4daaaa716 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-01Switch from functest to XtestingCédric Ollivier1-1/+1
It also fixes logging.ini and tox.ini. Change-Id: I3001dd847d0cd4bcffb7e466ba1cf5a71705f636 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-01Add Kubernetes conformance testsdjkonro1-11/+55
JIRA: FUNCTEST-905 Change-Id: I2f70884811431f21fe98bb6a989a9172f3612a64 Signed-off-by: djkonro <konraddjimeli@gmail.com>
2018-01-25Remove KUBE_MASTER which is not a require environment variabledjkonro1-1/+0
Change-Id: I948c3c843dcf625317be4be44e496c1e2da2a23c Signed-off-by: djkonro <konraddjimeli@gmail.com>
2018-01-24Add initial python class for kubernetes testingdjkonro1-0/+96
JIRA: FUNCTEST-904 Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I9007e4e6f58118d1b09774d0acbb2a315437e09a Signed-off-by: djkonro <konraddjimeli@gmail.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>