Code Monkey home page Code Monkey logo

ci's Introduction

ci

Repository for continuous integration tests for the CoreDNS project. Currently tests relating to Kubernetes are contained here, but integration tests for other internal CoreDNS plugins may be moved here or added here in the future. The repository also contains tests related to Kubernetes Deployment and external plugins (kubernetai, metadata_edns0).

Running Tests

The tests are run using CircleCI. New PRs in this repository will be tested against all the tests with CoreDNS built from master.

The configuration is set in such a way that they can be run in your fork, in case you want to run the tests in your fork before submitting a PR here. CircleCI must be enabled on your fork for this to work.

Adding and Testing New Tests, or Changes to Tests

The go tests are located in /tests directory tree. /build contains scripts for spinning up the test environment such as setting up a local Kubernetes cluster environment for Kubernetes related tests. The configuration for running the tests is done in the .circleci/config.yaml file.

Running Kubernetes Related CI Tests Locally

You can run these tests locally, though the process to get them working is not streamlined in any way. At a high level, you should be able to do something like the following:

  1. install/start a kubernetes cluster to run the tests.
  2. make sure kubeconfig is set up to point to your cluster, and that kubectl works
  3. create the required fixtures using kubectl apply -f $GOPATH/src/github.com/coredns/ci/build/kubernetes/dns-test.yaml. This creates a static set of test services/pods/namespaces (namespaces named test-1, test-2, etc).
  4. build the docker image of coredns. cd $GOPATH/src/github.com/coredns/coredns && make coredns SYSTEM="GOOS=linux" && docker build -t coredns .
  5. patch the coredns deployment with kubectl patch deployment coredns -n kube-system -p "$(cat $GOPATH/src/github.com/coredns/ci/build/kubernetes/coredns_deployment_patch.yaml"). If your docker image name is not "coredns", update the name of the docker image in the deployment or in the patch file prior to applying it.
  6. run the tests with go test .... e.g. go test -v ./test/kubernetes/...

ci's People

Contributors

chrisohaver avatar rajansandeep avatar miekg avatar yongtang avatar johnbelamaric avatar aojea avatar nyodas avatar xuanwo avatar stuartnelson3 avatar

Watchers

James Cloos avatar  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.