kubetest | Kubernetes integration testing in Python via pytest | Functional Testing library

 by   vapor-ware Python Version: 0.9.5 License: GPL-3.0

kandi X-RAY | kubetest Summary

kandi X-RAY | kubetest Summary

kubetest is a Python library typically used in Testing, Functional Testing applications. kubetest has no bugs, it has no vulnerabilities, it has build file available, it has a Strong Copyleft License and it has low support. You can install using 'pip install kubetest' or download it from GitHub, PyPI.

Kubetest is a pytest plugin that makes it easier to manage a Kubernetes cluster within your integration tests. While you can use the Kubernetes Python client directly, this plugin provides some cluster and object management on top of that so you can spend less time setting up and tearing down tests and more time actually writing your tests. In particular, this plugin is useful for testing your Kubernetes infrastructure (e.g., ensure it deploys and behaves correctly) and for testing disaster recovery scenarios (e.g. delete a pod or deployment and inspect the aftermath). For more information, see the kubetest documentation.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              kubetest has a low active ecosystem.
              It has 176 star(s) with 56 fork(s). There are 11 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 30 open issues and 69 have been closed. On average issues are closed in 44 days. There are 7 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of kubetest is 0.9.5

            kandi-Quality Quality

              kubetest has 0 bugs and 30 code smells.

            kandi-Security Security

              kubetest has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              kubetest code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              kubetest is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              kubetest releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              kubetest saves you 1645 person hours of effort in developing the same functionality from scratch.
              It has 3637 lines of code, 311 functions and 53 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kubetest
            Get all kandi verified functions for this library.

            kubetest Key Features

            No Key Features are available at this moment for kubetest.

            kubetest Examples and Code Snippets

            No Code Snippets are available at this moment for kubetest.

            Community Discussions

            QUESTION

            Ingress with Nginx Controller not working, Address missing
            Asked 2021-Jan-31 at 20:19

            I have a Kubernetes Cluster running on a 1 master, 2 worker setup ob linux servers. I have a HAProxy forwarding my requests to Nginx Controllers. My complete setup is behind a corporate proxy. The DNS entry is enabled in this corporate proxy. Requests will get to the nginx controller, but wont be forwarded to the service. I installed the ingress controller as descibed by many tutorials with the files in https://github.com/kubernetes/ingress-nginx .

            I'm new to stack overflow, so if i should give more specific information just let me know. I hope someone can help me with my issue, thank you in advance :D

            My Ingress with missing Address:

            ...

            ANSWER

            Answered 2021-Jan-31 at 14:29

            Looking at the Ingress definition, I see that it misses the ingress class. Either you defined an IngressClass annotated as the default class to use, or that may be the reason your Ingress is not working, at the moment.

            An Ingress Class is basically a category which specify who needs to serve and manage the Ingress, this is necessary since in a cluster you can have more than one Ingress controller, each one with its rules and configurations.

            Depending on the Kubernetes version, the ingress class can be defined with an annotation on the ingress (before v1.18) such as:

            Source https://stackoverflow.com/questions/65979766

            QUESTION

            Simple way to delete existing pods from Python
            Asked 2020-Oct-06 at 19:26

            I have end-to-end tests written in pytest, running on a Kubernetes cluster in Namespace foo. Now I want to add simple chaos engineering to the tests to check the resilience of my services. For this, I only need to delete specific pods within foo -- since K8s restarts the corresponding service, this simulates the service being temporarily unreachable.

            What is a simple way to delete a specific pod in the current namespace with Python?

            What I have tried so far:

            Since I did not find a suitable example in https://github.com/kubernetes-client/python/tree/master/examples, but the ones using pods looked quite complex, I looked into kubetest, which seems very simple and elegant.

            I wanted to use the kube fixture and then do something like this:

            ...

            ANSWER

            Answered 2020-Oct-06 at 19:26

            you can use delete_namespaced_pod(from CoreV1Api) to delete specific pods within a namespace.

            Here is an example:

            Source https://stackoverflow.com/questions/64221992

            QUESTION

            unable to create docker image in minikube's docker daemon
            Asked 2020-Sep-04 at 12:19

            I'm trying to add an image to the Docker daemon running inside my Minikube, so it can be Pulled locally for Development purposes.

            First I check the list of local installed Docker images

            ...

            ANSWER

            Answered 2020-Sep-04 at 12:19

            sudo discards most environment variables, but it's not necessary here.

            The only reason you generally need to sudo docker ... is because access on the /var/run/docker.sock file is restricted; and that's because you can very easily use it to root the host. If you've set the $DOCKER_HOST environment variable, you're not using this socket file, and so you don't need sudo.

            If you really need to run docker build as root for other reasons, sudo -E will preserve environment variables.

            Source https://stackoverflow.com/questions/63735757

            QUESTION

            There is unknown field "container" in Tekton
            Asked 2020-Mar-02 at 15:24

            I'm interested in Tekton these days.

            However there are some issue when I implement Task with java fabric8.tekton apis.

            There exist api which is adding steps in spec in units of container(withContainer) in TaskBuilder class.

            However I got error message in rune time like below,

            Can I get some advices?

            Tekton version - v0.10.1

            I used packages like below:

            io.fabric8:kubernetes-client:4.7.1

            io.fabric8:tekton-client:4.7.1

            Here is my complete test code.

            ...

            ANSWER

            Answered 2020-Mar-02 at 15:24

            Tekton ships with an admission controller, which validates the CRD specs before allowing them into the cluster. Because the project is still in alpha, its moving quite fast. Fabric8 may be templating out K8s objects against a different spec from what has been installed on your cluster. You should be able to validate the spec version used in Fabric8 and remove all the Tekton objects in your cluster and re-apply them at a specific version.

            Source https://stackoverflow.com/questions/60049533

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install kubetest

            This plugin can be installed with pip. Note that the kubetest package has entrypoint hooks defined in its setup.py which allow it to be automatically made available to pytest. This means that it will run whenever pytest is run. Since kubetest expects a cluster to be set up and to be given configuration for that cluster, pytest will fail if those are not present. It is therefore recommended to only install kubetest in a virtual environment or other managed environment, such as a CI pipeline, where you can assure that cluster access and configuration are available.

            Support

            See the kubetest documentation page for details on command line usage, available fixtures and markers, and general pytest integration.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install kubetest

          • CLONE
          • HTTPS

            https://github.com/vapor-ware/kubetest.git

          • CLI

            gh repo clone vapor-ware/kubetest

          • sshUrl

            git@github.com:vapor-ware/kubetest.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link