cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <peter.murysh...@zv.fraunhofer.de>
Subject AW: Where to start to reuse API integration tests as functional test from CS codebase?
Date Fri, 12 Apr 2019 13:55:24 GMT
Hi, Wei Zhou,

thank you very much for providing your setup.cfg, I get exactly same error:

nosetests: error: Error reading config file 'setup.cfg': File contains no section headers.
file: 'setup.cfg', line: 1
'{\n'

(I have copied your email to the bash editor "nano")

kind regards
Peter
________________________________________
Von: Wei ZHOU [ustcweizhou@gmail.com]
Gesendet: Freitag, 12. April 2019 15:49
An: dev@cloudstack.apache.org
Betreff: Re: Where to start to reuse API integration tests as functional test from CS codebase?

Hi Peter,

Can you check the setup.cfg ?

Here is an example of setup.cfg on my platform (kvm).

{
    "zones": [
        {
            "name": "zone118-4",
            "guestcidraddress": "192.168.10.0/24",
            "dns1": "8.8.8.8",
            "physical_networks": [
                {
                    "broadcastdomainrange": "Zone",
                    "vlan": "2000-2100",
                    "name": "Management",
                    "traffictypes": [
                        {
                            "kvm": "cloudbr0",
                            "typ": "Management"
                        },
                        {
                            "kvm": "cloudbr0",
                            "typ": "Guest"
                        }
                    ],
                    "providers": [
                        {
                            "broadcastdomainrange": "ZONE",
                            "name": "VirtualRouter"
                        },
                        {
                            "broadcastdomainrange": "ZONE",
                            "name": "VpcVirtualRouter"
                        },
                        {
                            "broadcastdomainrange": "ZONE",
                            "name": "InternalLbVm"
                        }
                    ],
                    "isolationmethods": [
                             "VLAN"
                    ]
                },
                {
                    "broadcastdomainrange": "Zone",
                    "name": "Public",
                    "traffictypes": [
                        {
                            "kvm": "cloudbr0",
                            "typ": "Public"
                        }
                    ],
                    "providers": [
                        {
                            "broadcastdomainrange": "ZONE",
                            "name": "VirtualRouter"
                        }
                    ]
                }
            ],
            "ipranges": [
                {
                    "startip": "10.11.118.144",
                    "endip": "10.11.118.159",
                    "netmask": "255.255.255.0",
                    "vlan": "untagged",
                    "gateway": "10.11.118.254"
                }
            ],
            "networktype": "Advanced",
            "pods": [
                {
                    "startip": "10.11.118.140",
                    "endip": "10.11.118.143",
                    "name": "pod1",
                    "netmask": "255.255.255.0",
                    "gateway": "10.11.118.254",
                    "clusters": [
                        {
                            "clustername": "cluster1",
                            "hypervisor": "KVM",
                            "hosts": [
                                {
                                    "username": "root",
                                    "url": "http://10.11.118.42/",
                                    "password": "xxxxxxxxxx"
                                },
                                {
                                    "username": "root",
                                    "url": "http://10.11.118.43/",
                                    "password": "xxxxxxxxx"
                                }
                            ],
                            "clustertype": "CloudManaged"
                        }
                    ]
                }
            ],
            "internaldns1": "8.8.4.4",
            "primaryStorages": [
                {
                    "url": "nfs://10.11.118.41:/data/primary1",
                    "name": "primary1",
                    "hypervisor": "KVM"
                }
            ],
            "secondaryStorages": [
                {
                    "url": "nfs://10.11.118.41:/data/secondary1",
                    "provider": "NFS"
                }
            ]
        }
    ],
    "logger":
    {
        "LogFolderPath": "/tmp/"
    },
    "dbSvr": {
        "dbSvr": "10.11.118.41",
        "passwd": "xxxxxxxxx",
        "db": "cloud",
        "port": 3306,
        "user": "cloud"
    },
    "mgtSvr": [
        {
            "mgtSvrIp": "10.11.118.40",
            "port": 8096,
            "hypervisor": "kvm"
        }
    ]
}



<peter.muryshkin@zv.fraunhofer.de> 于2019年4月12日周五 下午3:26写道:

> Hi, all,
>
> the following Dockerfile:
>
>
> https://github.com/pmury/cloudstack/blob/marvin-101/test/integration/Dockerfile.python27
>
> and setup.cfg both adopted, either 1:1 copied from the installation
> instructions, produces the following error:
>
>
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python#Marvin-TestingwithPython-Installation.1
>
> Usage: nosetests [options]
>
> nosetests: error: Error reading config file 'setup.cfg': File contains no
> section headers.
> file: 'setup.cfg', line: 1
> '{\n'
> The command '/bin/sh -c nosetests --with-marvin
> --marvin-config=./setup.cfg --hypervisor=vmware -s -a tags=advanced
> /opt/cs/test/integration/component/' returned a non-zero code: 2
>
> How can JSON miss section headers? Maybe this should be .ini format?
>
>
> kind regards
> Peter
> ________________________________________
> Von: Muryshkin, Peter
> Gesendet: Donnerstag, 11. April 2019 14:45
> An: dev@cloudstack.apache.org
> Betreff: AW: Where to start to reuse API integration tests as functional
> test from CS codebase?
>
> Hi, Paul,
>
> thanks and sorry for mixing up threads!
>
> This simple Docker environment to run Marvin seems to work:
>
>
> https://github.com/pmury/cloudstack/blob/marvin-101/test/integration/Dockerfile.python27
>
>
> kind regards
> Peter
>
>
> ________________________________________
> Von: Paul Angus [paul.angus@shapeblue.com]
> Gesendet: Mittwoch, 10. April 2019 17:41
> An: dev@cloudstack.apache.org
> Betreff: RE: Where to start to reuse API integration tests as functional
> test from CS codebase?
>
> Hi Peter,
>
> The documentation is here:
>
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python
>
> but it's not the easiest thing in the world to follow.... ☹
>
> In summary:
>
> - we have created a CloudStack specific plugin for the nosetests framework
> which is called Marvin.
> - once you setup a link to a CloudStack repo as you would to install the
> CloudStack management server, you should be able to yum/apt install
> cloudstack-marvin cloudstack-integration-tests to get everything that you
> need (note Marvin is written for python 2.7)
> - you need to edit the setup.cfg to match your environment
> - you MAY also need to edit the test_data.py file as well
> - to run a single test run:
>
> nosetests --with-marvin --marvin-config=./setup.cfg --hypervisor=vmware -s
> -a tags=advanced $file
>
> You can pass a directory rather than a file.
>
>
> There is a lot more to it, but this is a start.
>
> Paul.
>
>
> paul.angus@shapeblue.com
> www.shapeblue.com
> Amadeus House, Floral Street, London  WC2E 9DPUK
> @shapeblue
>
>
>
>
> -----Original Message-----
> From: peter.muryshkin@zv.fraunhofer.de <peter.muryshkin@zv.fraunhofer.de>
> Sent: 10 April 2019 16:23
> To: dev@cloudstack.apache.org
> Subject: Where to start to reuse API integration tests as functional test
> from CS codebase?
>
> Hi all,
>
> where to to start if I want to run just exactly that part of the CS test
> code base to test the API functionality of a separately deployed instance?
>
> I've found so far this folder:
> https://github.com/apache/cloudstack/tree/master/test/integration/component
>
> There are though different scripts in Python, and the folder is a Java
> Maven module?
>
> So how to know which dependencies to I need and where to start?
>
> Is there also a set of regression tests somewhere reflecting bugs fixed in
> course of the time?
>
> thanks in advance
> kind regards
> Peter
>
>
>
Mime
View raw message