Giter Site home page Giter Site logo

tf-test's Introduction

Contrail Test Scripts

This software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Overview

The Contrail Test repository contains the test code for validating the Contrail infrastructure. The code is organized into fixtures , scripts and serial_scripts.

Testcases under scripts folder are independent of each other and can be run in parallel. Testcases under serial_scripts can have cluster-wide impact and MUST be run only one at a time.

run_tests.sh lets you run these tests as well. Take a look at this .

fixtures

Contains high level fixtures for creating projects, virtual networks, virtual machines, floating ips, policies, security-groups, service instances, VPCs, VDNS etc. and validate these objects against Contrail components like Contrail API Server, Control nodes, Virtual Routers. The fixtures provide verify_on_setup() and verify_on_cleanup() methods to achieve this. They also provide some commonly used methods to work with these objects. Examples include:

  • To run commands on a VM and verify connectivity to it
  • Traffic send/receive methods using tools like scapy/netperf
  • Policy rules validation with traffic
  • Perform tcp/icmp/ssh/scp/tftp validations on the VM
  • Flow verification for traffic
  • Analytics data validation

scripts, serial_scripts

Test scripts at a per-feature level. Sub-folders are created for the features.

Test container

The scripts can be executed from a containerized environment. As part of the contrail software the test containers are also being built and posted @ https://hub.docker.com/r/opencontrailnightly/contrail-test-test/

Build test container

Test container is split into base and test containers where in base has sku and orchestrator independent packages like testr, chrome, wget, git etal and test container has orchestrator and sku specific packages on top of base.

One can also custom build base and test containers

To build base test container

    $> ./build-container.sh base -h
       Build base container

       Usage: ./build-container.sh base
         -h|--help                     Print help message
         --registry-server REGISTRY_SERVER Docker registry hosting the base test container, specify if the image needs to be pushed
         --tag             TAG           Docker container tag, default to sku
    $> ./build-container.sh base --registry-server opencontrailnightly/ --tag ocata-bld-1

To build test container

    $> ./build-container.sh test -h
       Build test container

       Usage: ./build-container.sh test [OPTIONS]

         -h|--help                     Print help message
         --tag           TAG           Docker container tag, default to sku
         --base-tag      BASE_TAG      Specify contrail-base-test container tag to use. Defaults to 'latest'.
         --sku           SKU           Openstack version. Defaults to ocata
         --contrail-repo CONTRAIL_REPO Contrail Repository, mandatory.
         --registry-server REGISTRY_SERVER Docker registry hosting the base test container, Defaults to docker.io/opencontrail
         --post          POST          Upload the test container to the registy-server, if specified
    $> ./build-container.sh test --tag ocata-bld-1 --base-tag ocata-bld-1 --sku ocata --package-url http://path/to/contrail-install-packages.rpm --contrail-repo http://path/to/contrail/repo/bld-1 --registry-server opencontrailnightly

Running Tests

    $> wget https://github.com/tungstenfabric/tf-test/raw/master/testrunner.sh
    $> docker pull opencontrailnightly/contrail-test-test:ocata-bld-1
    $> ./testrunner.sh run -P /path/to/contrail_test_input.yaml contrail-test-test:ocata-bld-1

You can find more detailed information about running tests @ (https://github.com/Juniper/contrail-test/wiki/How-to-use-contrail-test-container#sample-testrunnersh-commands)

Filing Bugs

Use launchpad http://bugs.launchpad.net/juniperopenstack to describe new bugs.

It will be useful to include the test run log file.

For post-analysis of a cluster, a fab task attach_logs_cores can collect the logs and cassandra logs.

Queries

Mail to [email protected] and [email protected].

IRC

#opencontrail on freenode.net

tf-test's People

Contributors

aaalt avatar absurya4 avatar alexey-mr avatar andrey-mp avatar aswanikumar90 avatar bansalnikhil avatar baukin avatar cdasari2169 avatar gleb108 avatar ivanvtimofeev avatar jnpr-pradeep avatar jnpr-pranav avatar kirillserious avatar kpatel333 avatar krharsh avatar manasdash78 avatar msahu-jnpr avatar msudhee avatar nishantsankhala avatar ritamganguly avatar rsetru1 avatar skiranh avatar sowmyak24 avatar sunilbasker avatar sunilbasker-jnpr avatar tikitavi avatar vappachan avatar vganapath avatar yashaswi-doddaveerappa avatar yashikabadaya avatar

Watchers

 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.