Coder Social home page Coder Social logo

distaf's People

Contributors

aloganat avatar lalatendumohanty avatar loadtheaccumulator avatar msvbhat avatar nixpanic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

distaf's Issues

Running unmodified distaf fails with Python stack in geo_rep/test_geo_basic.py

When I run distaf from the main source directory, I get the following Python stack:

# ./main.py -c example.conf.yml 
Traceback (most recent call last):
  File "./main.py", line 117, in <module>
    main()
  File "./main.py", line 100, in main
    collect_tests()
  File "./main.py", line 36, in collect_tests
    __import__(iname.replace("/", "."))
  File "/opt/distaf/tests_d/geo_rep/test_geo_basic.py", line 4, in <module>
    @testcase("changelog-test-create")
  File "/opt/distaf/distaf/util.py", line 49, in decorator
    tc_config = get_testcase_config(func.__doc__)
  File "/opt/distaf/distaf/config_parser.py", line 33, in get_testcase_config
    config_dict = yaml.load(config_string)
  File "/usr/lib64/python2.7/site-packages/yaml/__init__.py", line 69, in load
    loader = Loader(stream)
  File "/usr/lib64/python2.7/site-packages/yaml/loader.py", line 34, in __init__
    Reader.__init__(self, stream)
  File "/usr/lib64/python2.7/site-packages/yaml/reader.py", line 85, in __init__
    self.determine_encoding()
  File "/usr/lib64/python2.7/site-packages/yaml/reader.py", line 124, in determine_encoding
    self.update_raw()
  File "/usr/lib64/python2.7/site-packages/yaml/reader.py", line 178, in update_raw
    data = self.stream.read(size)
AttributeError: 'NoneType' object has no attribute 'read'

Removing the tests_d/geo_rep directory makes it possible to run the tests.

No /var/log/tests/ at test nodes (gluster server) to verify the test result

I installed and ran distaf against two gluster server and its result is passed it seems but I could not see any gluster related info at the test nodes (gluster server).

I did ssh-copy-id for user fractalio which is not root user.

Do I need to do ssh-copy-id for root user ?

How to verify that the testcase has been really executed on the test nodes ?

Let me know, if you need any further info.

config.sh file content:


export MGMT_NODE="mgmt_node"

export NODES="192.168.1.244"

export CLIENTS="client0 client1"

export PEERS="192.168.1.245"

export GM_NODES="gm_master0 gm_master1"

export GS_NODES="gs_slave0 gs_slave1"

development1@development1-ME051 ~/Documents/distaf $ sudo python main.py


test_gluster_basic_test (main.gluster_tests) ... ok


Ran 1 test in 0.001s

OK

development1@development1-ME051 ~/Documents/distaf $ tail -f /var/log/tests/distaf_tests.log


2015-02-20 13:49:49,254 INFO gluster_basic_test Testing gluster volume create and mounting
^C

Two questions

I have two questions need to inquiry:
1, when I perform the test case, prompt yaml is not found, yaml is what? How is generated?
2, util.py document, testcase, test_list, test_seq, test_mount, globl_configs, global_mode, tc value fill out there is no limit? Can you see you how to fill in?

help

Distaf is a distributed testing framework, but it can be done? What are the advantages? Whether can describe for me? I saw a test tool blockade yesterday, I know it can be done? But I see the distaf, I don't know what can it do?

Better way to handle exceptions in each test case

Right now whenever there is a exception in any test case it is caught and only name of the exception is thrown. But this is not very friendly for debugging. So either don't catch the exception or find a way to print the entire stack trace in a better way.

Add the option to tag test cases, and run (or skip) certain tags

One of the QA guys reported a bug against Gluster/NFS. The problem was reproducible with quite a time-consuming test:

mount -t nfs storage.example.com:/volume /mnt
cd /mnt
if [ ! -e linux-3.19.tar.gz ]
then
    curl https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.19.tar.gz > linux-3.19.tar.gz
fi

# abort on error
set -e

for i in {1..1000}
do
    tar -xvf linux-3.19.tar.gz
    sleep 180
    rm -rf linux-3.19
done

I would like to write a test-case for this, but it should not execute by default. It would be nice to have an option to mark a test-case with "tags: long-running" or something in the doc string so that tests like this can easily be skipped.

Add software version check to test metedata

Because tests and code are split over multiple repositories, it would be good to have an option in the test metadata that can be used to only run the test if the version of the components is high enough. (Or run the tests, but do not include the result in the final PASS/FAIL result?)

Practical example:
I would like to add a test to distaf that tests for different mount options. The change in Gluster might not be merged or backported to all branches yet. It would be bad for distaf to fail for tests that are not expected to pass for certain versions.

code reorg

get_config_data() in lib/util.py could be more elegant. Instead of a series of if/else statements, iterating a list of possible keys (along side the regular assignments) would be better IMO.

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.