Coder Social home page Coder Social logo

sarthak-chakraborty / acto Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xlab-uiuc/acto

0.0 0.0 0.0 20.23 MB

Push-Button End-to-End Testing of Kubernetes Operators and Controllers

License: Apache License 2.0

Shell 3.52% Python 78.65% C 0.31% Go 17.49% Makefile 0.03%

acto's Introduction

Acto: Push-Button End-to-End Testing of Kubernetes Operators and Controllers

License Regression Test End-to-End Test Bug Reproduction

Overview

Acto is a fully automatic end-to-end testing tool for Kubernetes operators/controllers.

Acto implements a state-centric approach to test the target operator together with the managed system. It continuously instructs the operator to reconcile the system to different states and checks if the system reaches those desired states. Acto models operations as state transitions and systematically realizes state-transition sequences to exercise supported operations in different scenarios. Acto's automated oracles check if a system’s state is as desired.

Acto is fully automatic. It only needs the operator’s deployment script as the input. Testing is done in a local Kubernetes environment supported by different backends: Kind, Minikube, and K3d. Details on Acto usage are here.

Acto has been applied to 11 popular Kuberentes, where it found 50+ new bugs (many are confirmed and 28 are fixed). See the lists of bugs found by Acto.

Prerequisites

[optional]

  • Helm
  • Development environment
    • python3 -m pip install -r requirements-dev.txt

Getting started

Users need to port the operator before testing it with Acto. We list the detailed steps of using Acto here. We are actively working on simplifying the process to make it more user-friendly.

Demo

To show Acto's bug-finding capability, we reproduce one of the previous bugs Acto found automatically.

First, run make to build Acto's shared objects:

make

To reproduce the bug, run the following command:

python3 -m acto.reproduce --reproduce-dir test/cassop-330/trial-demo --config data/cass-operator/config.json

The files in the test/cassop-330/trial-demo directory are the sequence of CRs required to trigger this bug. They are just a small subset of CRs generated by Acto automatically.

Acto first spins up a local Kubernetes cluster using Kind and deploys the cass-operator. It then deploys CassandraDatacenter using the initial CR and generates a transition to insert a key-value pair to CassandraDatacenter's property spec.additionalServiceConfig.seedService.additionalLabels. This transition triggered the cass-operator to add the key-value pair to metadata.labels of the corresponding SeedService resource. For the next step, Acto deletes the key-value pair. Due to a bug in cass-operator, the deleted key-value pair is not removed from the SeedService resource in Kubernetes. Acto automatically detects this bug based on the inconsistency between the CR and the system resources.

Contributing

Thank you for your interest in Acto! We welcome all feedback and contributions. If you wish to file a bug or enhancement proposal or have other questions, please use the Github Issue. If you'd like to contribute code, please open a Pull Request.

acto's People

Contributors

tylergu avatar unw9527 avatar essoz avatar github-actions[bot] avatar kevchentw avatar kashuncheng avatar spedoske avatar tianyin avatar kevin85421 avatar markintoshz avatar shuaiwang516 avatar whentojump avatar taham0 avatar xinze-zheng avatar 312hzeng avatar thrivikramanv avatar sarthak-chakraborty avatar twinisland avatar louhaina avatar tz-zzz avatar qsdrqs avatar marshtompsxd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.