SlideShare uma empresa Scribd logo
1 de 22
Practical Glusto
Example
Jonathan Holloway
Principal Quality Engineer - Red Hat Storage
Practical Glusto Example
Very Brief Intro
to Glusto
Glusto is...
● Glusto is a “framework” or collection of commonly used tools
for developing scripts and tests for distributed systems.
● Primary components
− A class combining a collection of tools in a single, easy-to-use interface.
− Command-line wrapper to make dynamic config files available to test frameworks
● Built on open source and standard tools.
− (e.g., Python modules, RPyC, SSH, REST, PyUnit, PyTest, Nose, etc.)
● Provides flexibility minus complexity during development.
− Simple import into existing scripts
− Access to functionality via Python Interactive Interpreter
− Code/Test/Code with IDE (e.g., Eclipse via PyDev)
Key Features
● Remote calls via SSH
● Remote calls via RPyC
● Read and store config files in yaml, json, and ini formats
● Logging
● Templates
● Provides a wrapper for unit test discovery and configuration
● Works with multiple unit test frameworks (PyUnit, PyTest, Nose)
● Simple REST client
● Accessible via Python module, Python Interactive Interpreter, and a CLI
client.
Practical Glusto Example
Install Glusto
Installing Glusto
● Installs via setuptools
− Directly from github with pip command
− # pip install –upgrade 
git+git://github.com/loadtheaccumulator/glusto.git
− Via setuptools with python setup.py
− # git clone https://github.com/loadtheaccumulator/glusto.git
# cd glusto
# python setup.py install
● Docker container
− docker.io/loadtheaccumulator/glusto
Installing glustolibs-gluster
● Installs via setuptools
− Directly from github with pip command
− # pip install –upgrade 
git+git://github.com/glusto-tests/glustolibs/glusto.git
− Via setuptools with python setup.py
− # git clone https://github.com/gluster/glusto-tests.git
# cd glusto-tests/glustolibs-gluster
# python setup.py install
● Docker container
− Contains both Glusto and glustolibs-gluster libraries
− May be available by the time you see this
Practical Glusto Example
Write Tests
Test Scripts with Glusto
● Standard PyUnit, PyTest, or Nose format
● Extendable via standard Python subclassing.
● Glusto just plugs in via import without dependency on
Glusto to run basic tests.
− from glusto.core import Glusto as g
● YAML config file containing the hosts
● clients: [192.168.1.225]
servers: [192.168.1.221, 192.168.1.222, 192.168.1.223, 192.168.1.224]
Basic PyUnit Script Format
● import unittest
class MyTestClass(unittest.TestCase):
@classmethod
def setUpClass(cls):
# runs before all test_ methods in the class
def setUp(self):
# runs before each test_ method in the class
def test_example1(self):
# test method representing a test case
def test_example2(self):
# test method representing a test case
def tearDown(self):
# runs after each test_ method in the class
@classmethod
def tearDownClass(cls):
# runs after all test_ methods in the class
Basic PyUnit Script Format
● import unittest
class MyTestClass(unittest.TestCase):
@classmethod
def setUpClass(cls):
# runs before all test_ methods in the class
def setUp(self):
# runs before each test_ method in the class
def test_example1(self):
# test method representing a test case
def test_example2(self):
# test method representing a test case
def tearDown(self):
# runs after each test_ method in the class
@classmethod
def tearDownClass(cls):
# runs after all test_ methods in the class
Basic PyUnit Script Format
● import unittest
class MyTestClass(unittest.TestCase):
@classmethod
def setUpClass(cls):
# runs before all test_ methods in the class
def setUp(self):
# runs before each test_ method in the class
def test_example1(self):
# test method representing a test case
def test_example2(self):
# test method representing a test case
def tearDown(self):
# runs after each test_ method in the class
@classmethod
def tearDownClass(cls):
# runs after all test_ methods in the class
Basic PyUnit Script Format
● import unittest
class MyTestClass(unittest.TestCase):
@classmethod
def setUpClass(cls):
# runs before all test_ methods in the class
def setUp(self):
# runs before each test_ method in the class
def test_example1(self):
# test method representing a test case
def test_example2(self):
# test method representing a test case
def tearDown(self):
# runs after each test_ method in the class
@classmethod
def tearDownClass(cls):
# runs after all test_ methods in the class
Basic PyUnit Script Format
● import unittest
class MyTestClass(unittest.TestCase):
@classmethod
def setUpClass(cls):
# runs before all test_ methods in the class
def setUp(self):
# runs before each test_ method in the class
def test_example1(self):
# test method representing a test case
def test_example2(self):
# test method representing a test case
def tearDown(self):
# runs after each test_ method in the class
@classmethod
def tearDownClass(cls):
# runs after all test_ methods in the class
import and class definition
● import unittest
import pytest
from glusto.core import Glusto as g
from gluster_base_class import runs_on
@runs_on([['distributed', 'replicated'], ['glusterfs', 'nfs']])
class GlusterDemoTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
# runs before all test_ methods in the class
def setUp(self):
# runs before each test_ method in the class
...
def tearDown(self):
# runs after each test_ method in the class
@classmethod
def tearDownClass(cls):
# runs after all test_ methods in the class
setUpClass/tearDownClass
● ...
@runs_on([['distributed', 'replicated'], ['glusterfs', 'nfs']])
class GlusterDemoTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.masternode = g.config['servers'][0]
cls.client = g.config['clients'][0]
cls.mountpoint = '/mnt/gluster-mount'
g.run(cls.masternode, 'service glusterd start')
g.run(cls.masternode, 'gluster volume start glustervol1')
g.run(cls.client, 'mount /mnt/gluster-mount')
...
@classmethod
def tearDownClass(cls):
g.run(cls.client, 'umount %s' % cls.mountpoint)
g.run(cls.masternode, 'gluster volume stop glustervol1')
g.run(cls.masternode, 'service glusterd stop')
setUp/tearDown
● ...
@runs_on([['distributed', 'replicated'], ['glusterfs', 'nfs']])
class GlusterDemoTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
...
def setUp(self):
self.filename = '%s/%s-%s' %
(self.mountpoint, self.volume, self.mount)
print('nCreating file %s' % self.filename)
g.run(self.client, 'touch %s' % self.filename)
...
def tearDown(self):
print('Removing file %s' % self.filename)
g.run(self.client, 'rm -f %s' % self.filename)
@classmethod
def tearDownClass(cls):
...
test_ method(s)
● ...
def setUp(self):
...
def test_mount_type(self):
rcode, _, _ = g.run(self.client,
'mount | grep %s' % self.mount)
self.assertEqual(rcode, 0,
'Mounted volume is not type %s' % self.mount)
@pytest.mark.bvt
def test_create_file_with_touch(self):
print('nTesting file %s' % self.filename)
rcode, rout, rerr = g.run(self.client, 'ls %s' % self.filename)
self.assertEqual(rcode, 0, 'File does not exist')
def tearDown(self):
...
...
Practical Glusto Example
Run Tests
Run via /usr/bin/glusto
● Glusto CLI wrapper provides config file(s) to tests
− $ glusto -c myconfig.yml --pytest='test_demo1.py'
● PyTest provides xUnit style output
− $ glusto -c myconfig.yml 
--pytest='test_demo1.py --junitxml=results.xml'
● Accepts PyTest marker (-m) and filter (-k) parameters
− $ glusto -c myconfig.yml 
--pytest='test_demo1.py -m bvt'
$ glusto -c myconfig.yml 
--pytest='test_demo1.py -k mount'
Practical Glusto Example
Demo
https://asciinema.org/a/7sb4vox7ucasmgbwyeii4rheh
Info
● Contact
− Email: gluster-devel@gluster.org
− IRC: FreeNode #gluster-dev (loadtheacc)
● Libraries and Tests Repo
− git clone http://review.gluster.org/glusto-tests
− Mirrored at http://github.com/gluster/glusto-tests
● Glusto Repo and Docs
− http://github.com/loadtheaccumulator/glusto
− http://glusto.readthedocs.io/

Mais conteúdo relacionado

Mais procurados

Gluster d thread_synchronization_using_urcu_lca2016
Gluster d thread_synchronization_using_urcu_lca2016Gluster d thread_synchronization_using_urcu_lca2016
Gluster d thread_synchronization_using_urcu_lca2016Gluster.org
 
Small, Simple, and Secure: Alpine Linux under the Microscope
Small, Simple, and Secure: Alpine Linux under the MicroscopeSmall, Simple, and Secure: Alpine Linux under the Microscope
Small, Simple, and Secure: Alpine Linux under the MicroscopeDocker, Inc.
 
Docker 原理與實作
Docker 原理與實作Docker 原理與實作
Docker 原理與實作kao kuo-tung
 
Containers: What are they, Really?
Containers: What are they, Really?Containers: What are they, Really?
Containers: What are they, Really?Sneha Inguva
 
Gluster and Kubernetes
Gluster and KubernetesGluster and Kubernetes
Gluster and KubernetesGluster.org
 
Docker 1.11 @ Docker SF Meetup
Docker 1.11 @ Docker SF MeetupDocker 1.11 @ Docker SF Meetup
Docker 1.11 @ Docker SF MeetupDocker, Inc.
 
CoreOS introduction - Johann Romefort
CoreOS introduction - Johann RomefortCoreOS introduction - Johann Romefort
CoreOS introduction - Johann RomefortStylight
 
Container (Docker) Orchestration Tools
Container (Docker) Orchestration ToolsContainer (Docker) Orchestration Tools
Container (Docker) Orchestration ToolsDhilipsiva DS
 
Scalability and Performance of CNS 3.6
Scalability and Performance of CNS 3.6Scalability and Performance of CNS 3.6
Scalability and Performance of CNS 3.6Gluster.org
 
Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)Sneha Inguva
 
はじめてのGlusterFS
はじめてのGlusterFSはじめてのGlusterFS
はじめてのGlusterFSTakahiro Inoue
 
Declare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyDeclare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyMoby Project
 
What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?Docker, Inc.
 
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013Gluster.org
 
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vosOSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vosNETWAYS
 

Mais procurados (20)

Gluster d thread_synchronization_using_urcu_lca2016
Gluster d thread_synchronization_using_urcu_lca2016Gluster d thread_synchronization_using_urcu_lca2016
Gluster d thread_synchronization_using_urcu_lca2016
 
Small, Simple, and Secure: Alpine Linux under the Microscope
Small, Simple, and Secure: Alpine Linux under the MicroscopeSmall, Simple, and Secure: Alpine Linux under the Microscope
Small, Simple, and Secure: Alpine Linux under the Microscope
 
Docker 原理與實作
Docker 原理與實作Docker 原理與實作
Docker 原理與實作
 
Containers: What are they, Really?
Containers: What are they, Really?Containers: What are they, Really?
Containers: What are they, Really?
 
Docker / Ansible
Docker / AnsibleDocker / Ansible
Docker / Ansible
 
Docker n co
Docker n coDocker n co
Docker n co
 
Gluster and Kubernetes
Gluster and KubernetesGluster and Kubernetes
Gluster and Kubernetes
 
Docker 1.11 @ Docker SF Meetup
Docker 1.11 @ Docker SF MeetupDocker 1.11 @ Docker SF Meetup
Docker 1.11 @ Docker SF Meetup
 
CoreOS introduction - Johann Romefort
CoreOS introduction - Johann RomefortCoreOS introduction - Johann Romefort
CoreOS introduction - Johann Romefort
 
Container (Docker) Orchestration Tools
Container (Docker) Orchestration ToolsContainer (Docker) Orchestration Tools
Container (Docker) Orchestration Tools
 
Gluster containers!
Gluster containers!Gluster containers!
Gluster containers!
 
CoreOS Intro
CoreOS IntroCoreOS Intro
CoreOS Intro
 
Scalability and Performance of CNS 3.6
Scalability and Performance of CNS 3.6Scalability and Performance of CNS 3.6
Scalability and Performance of CNS 3.6
 
CoreOS intro
CoreOS introCoreOS intro
CoreOS intro
 
Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)
 
はじめてのGlusterFS
はじめてのGlusterFSはじめてのGlusterFS
はじめてのGlusterFS
 
Declare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyDeclare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and Moby
 
What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?
 
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
 
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vosOSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
 

Destaque

Ten quick tips for building muscle!
Ten quick tips for building muscle!Ten quick tips for building muscle!
Ten quick tips for building muscle!Hassen Saber
 
Gsummit apis-2012
Gsummit apis-2012Gsummit apis-2012
Gsummit apis-2012Gluster.org
 
Architecture in-the-small-slides
Architecture in-the-small-slidesArchitecture in-the-small-slides
Architecture in-the-small-slidesvinaikopp
 
Seek and ye shall find - 28.10.2016
Seek and ye shall find - 28.10.2016Seek and ye shall find - 28.10.2016
Seek and ye shall find - 28.10.2016Sonja Riesterer
 
Deterministic releases and how to get there with Nigel Babu
Deterministic releases and how to get there with Nigel BabuDeterministic releases and how to get there with Nigel Babu
Deterministic releases and how to get there with Nigel BabuGluster.org
 
Meet us by turkish team
Meet us by turkish teamMeet us by turkish team
Meet us by turkish teamsenguldeniz
 
Dados e Serviços Remotos via DataSnap
Dados e Serviços Remotos via DataSnapDados e Serviços Remotos via DataSnap
Dados e Serviços Remotos via DataSnapLanderson Gomes
 
Microservices: next-steps
Microservices: next-stepsMicroservices: next-steps
Microservices: next-stepsBoyan Dimitrov
 
Performance bottlenecks for metadata workload in Gluster with Poornima Gurusi...
Performance bottlenecks for metadata workload in Gluster with Poornima Gurusi...Performance bottlenecks for metadata workload in Gluster with Poornima Gurusi...
Performance bottlenecks for metadata workload in Gluster with Poornima Gurusi...Gluster.org
 
On demand file-caching_-_gustavo_brand
On demand file-caching_-_gustavo_brandOn demand file-caching_-_gustavo_brand
On demand file-caching_-_gustavo_brandGluster.org
 
Gluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmapGluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmapGluster.org
 
los principios del sistema democratico
los principios del sistema democraticolos principios del sistema democratico
los principios del sistema democraticoluz mery vilca copaja
 
The Amazon Web Services support
The Amazon Web Services supportThe Amazon Web Services support
The Amazon Web Services supportSimone Brunozzi
 
Mage Titans USA 2016 - Kimberely Thomas - Adopting Scrum and Agile for Develo...
Mage Titans USA 2016 - Kimberely Thomas - Adopting Scrum and Agile for Develo...Mage Titans USA 2016 - Kimberely Thomas - Adopting Scrum and Agile for Develo...
Mage Titans USA 2016 - Kimberely Thomas - Adopting Scrum and Agile for Develo...Stacey Whitney
 
Mage Titans USA 2016 - Brendan Falkowski Designing the B2B Experience
Mage Titans USA 2016 -  Brendan Falkowski Designing the B2B ExperienceMage Titans USA 2016 -  Brendan Falkowski Designing the B2B Experience
Mage Titans USA 2016 - Brendan Falkowski Designing the B2B ExperienceStacey Whitney
 
Deploy Magento Shops with Capistrano v3
Deploy Magento Shops with Capistrano  v3Deploy Magento Shops with Capistrano  v3
Deploy Magento Shops with Capistrano v3Roman Hutterer
 

Destaque (20)

Ten quick tips for building muscle!
Ten quick tips for building muscle!Ten quick tips for building muscle!
Ten quick tips for building muscle!
 
Resume 2016C
Resume 2016CResume 2016C
Resume 2016C
 
Gsummit apis-2012
Gsummit apis-2012Gsummit apis-2012
Gsummit apis-2012
 
Architecture in-the-small-slides
Architecture in-the-small-slidesArchitecture in-the-small-slides
Architecture in-the-small-slides
 
Seek and ye shall find - 28.10.2016
Seek and ye shall find - 28.10.2016Seek and ye shall find - 28.10.2016
Seek and ye shall find - 28.10.2016
 
Magento_2.0_-_Digital_Commerce_Architecture_-_White_Paper_-_Nov2015-2016-02-0...
Magento_2.0_-_Digital_Commerce_Architecture_-_White_Paper_-_Nov2015-2016-02-0...Magento_2.0_-_Digital_Commerce_Architecture_-_White_Paper_-_Nov2015-2016-02-0...
Magento_2.0_-_Digital_Commerce_Architecture_-_White_Paper_-_Nov2015-2016-02-0...
 
Deterministic releases and how to get there with Nigel Babu
Deterministic releases and how to get there with Nigel BabuDeterministic releases and how to get there with Nigel Babu
Deterministic releases and how to get there with Nigel Babu
 
Meet us by turkish team
Meet us by turkish teamMeet us by turkish team
Meet us by turkish team
 
Dados e Serviços Remotos via DataSnap
Dados e Serviços Remotos via DataSnapDados e Serviços Remotos via DataSnap
Dados e Serviços Remotos via DataSnap
 
Microservices: next-steps
Microservices: next-stepsMicroservices: next-steps
Microservices: next-steps
 
Performance bottlenecks for metadata workload in Gluster with Poornima Gurusi...
Performance bottlenecks for metadata workload in Gluster with Poornima Gurusi...Performance bottlenecks for metadata workload in Gluster with Poornima Gurusi...
Performance bottlenecks for metadata workload in Gluster with Poornima Gurusi...
 
On demand file-caching_-_gustavo_brand
On demand file-caching_-_gustavo_brandOn demand file-caching_-_gustavo_brand
On demand file-caching_-_gustavo_brand
 
Gluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmapGluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmap
 
los principios del sistema democratico
los principios del sistema democraticolos principios del sistema democratico
los principios del sistema democratico
 
Turkish food
Turkish foodTurkish food
Turkish food
 
Agile Product Management
Agile Product ManagementAgile Product Management
Agile Product Management
 
The Amazon Web Services support
The Amazon Web Services supportThe Amazon Web Services support
The Amazon Web Services support
 
Mage Titans USA 2016 - Kimberely Thomas - Adopting Scrum and Agile for Develo...
Mage Titans USA 2016 - Kimberely Thomas - Adopting Scrum and Agile for Develo...Mage Titans USA 2016 - Kimberely Thomas - Adopting Scrum and Agile for Develo...
Mage Titans USA 2016 - Kimberely Thomas - Adopting Scrum and Agile for Develo...
 
Mage Titans USA 2016 - Brendan Falkowski Designing the B2B Experience
Mage Titans USA 2016 -  Brendan Falkowski Designing the B2B ExperienceMage Titans USA 2016 -  Brendan Falkowski Designing the B2B Experience
Mage Titans USA 2016 - Brendan Falkowski Designing the B2B Experience
 
Deploy Magento Shops with Capistrano v3
Deploy Magento Shops with Capistrano  v3Deploy Magento Shops with Capistrano  v3
Deploy Magento Shops with Capistrano v3
 

Semelhante a Practical Glusto Example

Gradle For Beginners (Serbian Developer Conference 2013 english)
Gradle For Beginners (Serbian Developer Conference 2013 english)Gradle For Beginners (Serbian Developer Conference 2013 english)
Gradle For Beginners (Serbian Developer Conference 2013 english)Joachim Baumann
 
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Matt Fuller
 
Intro to Testing in Zope, Plone
Intro to Testing in Zope, PloneIntro to Testing in Zope, Plone
Intro to Testing in Zope, PloneQuintagroup
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java DevelopersYakov Fain
 
LISA15: systemd, the Next-Generation Linux System Manager
LISA15: systemd, the Next-Generation Linux System Manager LISA15: systemd, the Next-Generation Linux System Manager
LISA15: systemd, the Next-Generation Linux System Manager Alison Chaiken
 
Cli jbug
Cli jbugCli jbug
Cli jbugmaeste
 
Bgoug 2019.11 test your pl sql - not your patience
Bgoug 2019.11   test your pl sql - not your patienceBgoug 2019.11   test your pl sql - not your patience
Bgoug 2019.11 test your pl sql - not your patienceJacek Gebal
 
POUG2019 - Test your PL/SQL - your database will love you
POUG2019 - Test your PL/SQL - your database will love youPOUG2019 - Test your PL/SQL - your database will love you
POUG2019 - Test your PL/SQL - your database will love youJacek Gebal
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using SwiftDiego Freniche Brito
 
Plone testingdzug tagung2010
Plone testingdzug tagung2010Plone testingdzug tagung2010
Plone testingdzug tagung2010Timo Stollenwerk
 
Testing Django APIs
Testing Django APIsTesting Django APIs
Testing Django APIstyomo4ka
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleStein Inge Morisbak
 
Testing Django Applications
Testing Django ApplicationsTesting Django Applications
Testing Django ApplicationsGareth Rushgrove
 
CMake Tutorial
CMake TutorialCMake Tutorial
CMake TutorialFu Haiping
 

Semelhante a Practical Glusto Example (20)

Gradle For Beginners (Serbian Developer Conference 2013 english)
Gradle For Beginners (Serbian Developer Conference 2013 english)Gradle For Beginners (Serbian Developer Conference 2013 english)
Gradle For Beginners (Serbian Developer Conference 2013 english)
 
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
 
Intro to Testing in Zope, Plone
Intro to Testing in Zope, PloneIntro to Testing in Zope, Plone
Intro to Testing in Zope, Plone
 
N Unit Presentation
N Unit PresentationN Unit Presentation
N Unit Presentation
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java Developers
 
LISA15: systemd, the Next-Generation Linux System Manager
LISA15: systemd, the Next-Generation Linux System Manager LISA15: systemd, the Next-Generation Linux System Manager
LISA15: systemd, the Next-Generation Linux System Manager
 
Cli jbug
Cli jbugCli jbug
Cli jbug
 
AS7 and CLI
AS7 and CLIAS7 and CLI
AS7 and CLI
 
Bgoug 2019.11 test your pl sql - not your patience
Bgoug 2019.11   test your pl sql - not your patienceBgoug 2019.11   test your pl sql - not your patience
Bgoug 2019.11 test your pl sql - not your patience
 
POUG2019 - Test your PL/SQL - your database will love you
POUG2019 - Test your PL/SQL - your database will love youPOUG2019 - Test your PL/SQL - your database will love you
POUG2019 - Test your PL/SQL - your database will love you
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Pyunit
PyunitPyunit
Pyunit
 
Unit testing
Unit testingUnit testing
Unit testing
 
Plone testingdzug tagung2010
Plone testingdzug tagung2010Plone testingdzug tagung2010
Plone testingdzug tagung2010
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
 
Testing Django APIs
Testing Django APIsTesting Django APIs
Testing Django APIs
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
 
UPC Testing talk 2
UPC Testing talk 2UPC Testing talk 2
UPC Testing talk 2
 
Testing Django Applications
Testing Django ApplicationsTesting Django Applications
Testing Django Applications
 
CMake Tutorial
CMake TutorialCMake Tutorial
CMake Tutorial
 

Mais de Gluster.org

Automating Gluster @ Facebook - Shreyas Siravara
Automating Gluster @ Facebook - Shreyas SiravaraAutomating Gluster @ Facebook - Shreyas Siravara
Automating Gluster @ Facebook - Shreyas SiravaraGluster.org
 
nfusr: a new userspace NFS client based on libnfs - Shreyas Siravara
nfusr: a new userspace NFS client based on libnfs - Shreyas Siravaranfusr: a new userspace NFS client based on libnfs - Shreyas Siravara
nfusr: a new userspace NFS client based on libnfs - Shreyas SiravaraGluster.org
 
Facebook’s upstream approach to GlusterFS - David Hasson
Facebook’s upstream approach to GlusterFS  - David HassonFacebook’s upstream approach to GlusterFS  - David Hasson
Facebook’s upstream approach to GlusterFS - David HassonGluster.org
 
Throttling Traffic at Facebook Scale
Throttling Traffic at Facebook ScaleThrottling Traffic at Facebook Scale
Throttling Traffic at Facebook ScaleGluster.org
 
GlusterFS w/ Tiered XFS
GlusterFS w/ Tiered XFS  GlusterFS w/ Tiered XFS
GlusterFS w/ Tiered XFS Gluster.org
 
Gluster Metrics: why they are crucial for running stable deployments of all s...
Gluster Metrics: why they are crucial for running stable deployments of all s...Gluster Metrics: why they are crucial for running stable deployments of all s...
Gluster Metrics: why they are crucial for running stable deployments of all s...Gluster.org
 
Data Reduction for Gluster with VDO
Data Reduction for Gluster with VDOData Reduction for Gluster with VDO
Data Reduction for Gluster with VDOGluster.org
 
Releases: What are contributors responsible for
Releases: What are contributors responsible forReleases: What are contributors responsible for
Releases: What are contributors responsible forGluster.org
 
RIO Distribution: Reconstructing the onion - Shyamsundar Ranganathan
RIO Distribution: Reconstructing the onion - Shyamsundar RanganathanRIO Distribution: Reconstructing the onion - Shyamsundar Ranganathan
RIO Distribution: Reconstructing the onion - Shyamsundar RanganathanGluster.org
 
Native Clients, more the merrier with GFProxy!
Native Clients, more the merrier with GFProxy!Native Clients, more the merrier with GFProxy!
Native Clients, more the merrier with GFProxy!Gluster.org
 
Gluster: a SWOT Analysis
Gluster: a SWOT Analysis Gluster: a SWOT Analysis
Gluster: a SWOT Analysis Gluster.org
 
GlusterD-2.0: What's Happening? - Kaushal Madappa
GlusterD-2.0: What's Happening? - Kaushal MadappaGlusterD-2.0: What's Happening? - Kaushal Madappa
GlusterD-2.0: What's Happening? - Kaushal MadappaGluster.org
 
What Makes Us Fail
What Makes Us FailWhat Makes Us Fail
What Makes Us FailGluster.org
 
Gluster as Native Storage for Containers - past, present and future
Gluster as Native Storage for Containers - past, present and futureGluster as Native Storage for Containers - past, present and future
Gluster as Native Storage for Containers - past, present and futureGluster.org
 
Heketi Functionality into Glusterd2
Heketi Functionality into Glusterd2Heketi Functionality into Glusterd2
Heketi Functionality into Glusterd2Gluster.org
 
Architecture of the High Availability Solution for Ganesha and Samba with Kal...
Architecture of the High Availability Solution for Ganesha and Samba with Kal...Architecture of the High Availability Solution for Ganesha and Samba with Kal...
Architecture of the High Availability Solution for Ganesha and Samba with Kal...Gluster.org
 
Challenges with Gluster and Persistent Memory with Dan Lambright
Challenges with Gluster and Persistent Memory with Dan LambrightChallenges with Gluster and Persistent Memory with Dan Lambright
Challenges with Gluster and Persistent Memory with Dan LambrightGluster.org
 
Sharding: Past, Present and Future with Krutika Dhananjay
Sharding: Past, Present and Future with Krutika DhananjaySharding: Past, Present and Future with Krutika Dhananjay
Sharding: Past, Present and Future with Krutika DhananjayGluster.org
 
State of Gluster Performance
State of Gluster PerformanceState of Gluster Performance
State of Gluster PerformanceGluster.org
 
Integration of Glusterfs in to commvault simpana
Integration of Glusterfs in to commvault simpanaIntegration of Glusterfs in to commvault simpana
Integration of Glusterfs in to commvault simpanaGluster.org
 

Mais de Gluster.org (20)

Automating Gluster @ Facebook - Shreyas Siravara
Automating Gluster @ Facebook - Shreyas SiravaraAutomating Gluster @ Facebook - Shreyas Siravara
Automating Gluster @ Facebook - Shreyas Siravara
 
nfusr: a new userspace NFS client based on libnfs - Shreyas Siravara
nfusr: a new userspace NFS client based on libnfs - Shreyas Siravaranfusr: a new userspace NFS client based on libnfs - Shreyas Siravara
nfusr: a new userspace NFS client based on libnfs - Shreyas Siravara
 
Facebook’s upstream approach to GlusterFS - David Hasson
Facebook’s upstream approach to GlusterFS  - David HassonFacebook’s upstream approach to GlusterFS  - David Hasson
Facebook’s upstream approach to GlusterFS - David Hasson
 
Throttling Traffic at Facebook Scale
Throttling Traffic at Facebook ScaleThrottling Traffic at Facebook Scale
Throttling Traffic at Facebook Scale
 
GlusterFS w/ Tiered XFS
GlusterFS w/ Tiered XFS  GlusterFS w/ Tiered XFS
GlusterFS w/ Tiered XFS
 
Gluster Metrics: why they are crucial for running stable deployments of all s...
Gluster Metrics: why they are crucial for running stable deployments of all s...Gluster Metrics: why they are crucial for running stable deployments of all s...
Gluster Metrics: why they are crucial for running stable deployments of all s...
 
Data Reduction for Gluster with VDO
Data Reduction for Gluster with VDOData Reduction for Gluster with VDO
Data Reduction for Gluster with VDO
 
Releases: What are contributors responsible for
Releases: What are contributors responsible forReleases: What are contributors responsible for
Releases: What are contributors responsible for
 
RIO Distribution: Reconstructing the onion - Shyamsundar Ranganathan
RIO Distribution: Reconstructing the onion - Shyamsundar RanganathanRIO Distribution: Reconstructing the onion - Shyamsundar Ranganathan
RIO Distribution: Reconstructing the onion - Shyamsundar Ranganathan
 
Native Clients, more the merrier with GFProxy!
Native Clients, more the merrier with GFProxy!Native Clients, more the merrier with GFProxy!
Native Clients, more the merrier with GFProxy!
 
Gluster: a SWOT Analysis
Gluster: a SWOT Analysis Gluster: a SWOT Analysis
Gluster: a SWOT Analysis
 
GlusterD-2.0: What's Happening? - Kaushal Madappa
GlusterD-2.0: What's Happening? - Kaushal MadappaGlusterD-2.0: What's Happening? - Kaushal Madappa
GlusterD-2.0: What's Happening? - Kaushal Madappa
 
What Makes Us Fail
What Makes Us FailWhat Makes Us Fail
What Makes Us Fail
 
Gluster as Native Storage for Containers - past, present and future
Gluster as Native Storage for Containers - past, present and futureGluster as Native Storage for Containers - past, present and future
Gluster as Native Storage for Containers - past, present and future
 
Heketi Functionality into Glusterd2
Heketi Functionality into Glusterd2Heketi Functionality into Glusterd2
Heketi Functionality into Glusterd2
 
Architecture of the High Availability Solution for Ganesha and Samba with Kal...
Architecture of the High Availability Solution for Ganesha and Samba with Kal...Architecture of the High Availability Solution for Ganesha and Samba with Kal...
Architecture of the High Availability Solution for Ganesha and Samba with Kal...
 
Challenges with Gluster and Persistent Memory with Dan Lambright
Challenges with Gluster and Persistent Memory with Dan LambrightChallenges with Gluster and Persistent Memory with Dan Lambright
Challenges with Gluster and Persistent Memory with Dan Lambright
 
Sharding: Past, Present and Future with Krutika Dhananjay
Sharding: Past, Present and Future with Krutika DhananjaySharding: Past, Present and Future with Krutika Dhananjay
Sharding: Past, Present and Future with Krutika Dhananjay
 
State of Gluster Performance
State of Gluster PerformanceState of Gluster Performance
State of Gluster Performance
 
Integration of Glusterfs in to commvault simpana
Integration of Glusterfs in to commvault simpanaIntegration of Glusterfs in to commvault simpana
Integration of Glusterfs in to commvault simpana
 

Último

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 

Último (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Practical Glusto Example

  • 1. Practical Glusto Example Jonathan Holloway Principal Quality Engineer - Red Hat Storage
  • 2. Practical Glusto Example Very Brief Intro to Glusto
  • 3. Glusto is... ● Glusto is a “framework” or collection of commonly used tools for developing scripts and tests for distributed systems. ● Primary components − A class combining a collection of tools in a single, easy-to-use interface. − Command-line wrapper to make dynamic config files available to test frameworks ● Built on open source and standard tools. − (e.g., Python modules, RPyC, SSH, REST, PyUnit, PyTest, Nose, etc.) ● Provides flexibility minus complexity during development. − Simple import into existing scripts − Access to functionality via Python Interactive Interpreter − Code/Test/Code with IDE (e.g., Eclipse via PyDev)
  • 4. Key Features ● Remote calls via SSH ● Remote calls via RPyC ● Read and store config files in yaml, json, and ini formats ● Logging ● Templates ● Provides a wrapper for unit test discovery and configuration ● Works with multiple unit test frameworks (PyUnit, PyTest, Nose) ● Simple REST client ● Accessible via Python module, Python Interactive Interpreter, and a CLI client.
  • 6. Installing Glusto ● Installs via setuptools − Directly from github with pip command − # pip install –upgrade git+git://github.com/loadtheaccumulator/glusto.git − Via setuptools with python setup.py − # git clone https://github.com/loadtheaccumulator/glusto.git # cd glusto # python setup.py install ● Docker container − docker.io/loadtheaccumulator/glusto
  • 7. Installing glustolibs-gluster ● Installs via setuptools − Directly from github with pip command − # pip install –upgrade git+git://github.com/glusto-tests/glustolibs/glusto.git − Via setuptools with python setup.py − # git clone https://github.com/gluster/glusto-tests.git # cd glusto-tests/glustolibs-gluster # python setup.py install ● Docker container − Contains both Glusto and glustolibs-gluster libraries − May be available by the time you see this
  • 9. Test Scripts with Glusto ● Standard PyUnit, PyTest, or Nose format ● Extendable via standard Python subclassing. ● Glusto just plugs in via import without dependency on Glusto to run basic tests. − from glusto.core import Glusto as g ● YAML config file containing the hosts ● clients: [192.168.1.225] servers: [192.168.1.221, 192.168.1.222, 192.168.1.223, 192.168.1.224]
  • 10. Basic PyUnit Script Format ● import unittest class MyTestClass(unittest.TestCase): @classmethod def setUpClass(cls): # runs before all test_ methods in the class def setUp(self): # runs before each test_ method in the class def test_example1(self): # test method representing a test case def test_example2(self): # test method representing a test case def tearDown(self): # runs after each test_ method in the class @classmethod def tearDownClass(cls): # runs after all test_ methods in the class
  • 11. Basic PyUnit Script Format ● import unittest class MyTestClass(unittest.TestCase): @classmethod def setUpClass(cls): # runs before all test_ methods in the class def setUp(self): # runs before each test_ method in the class def test_example1(self): # test method representing a test case def test_example2(self): # test method representing a test case def tearDown(self): # runs after each test_ method in the class @classmethod def tearDownClass(cls): # runs after all test_ methods in the class
  • 12. Basic PyUnit Script Format ● import unittest class MyTestClass(unittest.TestCase): @classmethod def setUpClass(cls): # runs before all test_ methods in the class def setUp(self): # runs before each test_ method in the class def test_example1(self): # test method representing a test case def test_example2(self): # test method representing a test case def tearDown(self): # runs after each test_ method in the class @classmethod def tearDownClass(cls): # runs after all test_ methods in the class
  • 13. Basic PyUnit Script Format ● import unittest class MyTestClass(unittest.TestCase): @classmethod def setUpClass(cls): # runs before all test_ methods in the class def setUp(self): # runs before each test_ method in the class def test_example1(self): # test method representing a test case def test_example2(self): # test method representing a test case def tearDown(self): # runs after each test_ method in the class @classmethod def tearDownClass(cls): # runs after all test_ methods in the class
  • 14. Basic PyUnit Script Format ● import unittest class MyTestClass(unittest.TestCase): @classmethod def setUpClass(cls): # runs before all test_ methods in the class def setUp(self): # runs before each test_ method in the class def test_example1(self): # test method representing a test case def test_example2(self): # test method representing a test case def tearDown(self): # runs after each test_ method in the class @classmethod def tearDownClass(cls): # runs after all test_ methods in the class
  • 15. import and class definition ● import unittest import pytest from glusto.core import Glusto as g from gluster_base_class import runs_on @runs_on([['distributed', 'replicated'], ['glusterfs', 'nfs']]) class GlusterDemoTest(unittest.TestCase): @classmethod def setUpClass(cls): # runs before all test_ methods in the class def setUp(self): # runs before each test_ method in the class ... def tearDown(self): # runs after each test_ method in the class @classmethod def tearDownClass(cls): # runs after all test_ methods in the class
  • 16. setUpClass/tearDownClass ● ... @runs_on([['distributed', 'replicated'], ['glusterfs', 'nfs']]) class GlusterDemoTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.masternode = g.config['servers'][0] cls.client = g.config['clients'][0] cls.mountpoint = '/mnt/gluster-mount' g.run(cls.masternode, 'service glusterd start') g.run(cls.masternode, 'gluster volume start glustervol1') g.run(cls.client, 'mount /mnt/gluster-mount') ... @classmethod def tearDownClass(cls): g.run(cls.client, 'umount %s' % cls.mountpoint) g.run(cls.masternode, 'gluster volume stop glustervol1') g.run(cls.masternode, 'service glusterd stop')
  • 17. setUp/tearDown ● ... @runs_on([['distributed', 'replicated'], ['glusterfs', 'nfs']]) class GlusterDemoTest(unittest.TestCase): @classmethod def setUpClass(cls): ... def setUp(self): self.filename = '%s/%s-%s' % (self.mountpoint, self.volume, self.mount) print('nCreating file %s' % self.filename) g.run(self.client, 'touch %s' % self.filename) ... def tearDown(self): print('Removing file %s' % self.filename) g.run(self.client, 'rm -f %s' % self.filename) @classmethod def tearDownClass(cls): ...
  • 18. test_ method(s) ● ... def setUp(self): ... def test_mount_type(self): rcode, _, _ = g.run(self.client, 'mount | grep %s' % self.mount) self.assertEqual(rcode, 0, 'Mounted volume is not type %s' % self.mount) @pytest.mark.bvt def test_create_file_with_touch(self): print('nTesting file %s' % self.filename) rcode, rout, rerr = g.run(self.client, 'ls %s' % self.filename) self.assertEqual(rcode, 0, 'File does not exist') def tearDown(self): ... ...
  • 20. Run via /usr/bin/glusto ● Glusto CLI wrapper provides config file(s) to tests − $ glusto -c myconfig.yml --pytest='test_demo1.py' ● PyTest provides xUnit style output − $ glusto -c myconfig.yml --pytest='test_demo1.py --junitxml=results.xml' ● Accepts PyTest marker (-m) and filter (-k) parameters − $ glusto -c myconfig.yml --pytest='test_demo1.py -m bvt' $ glusto -c myconfig.yml --pytest='test_demo1.py -k mount'
  • 22. Info ● Contact − Email: gluster-devel@gluster.org − IRC: FreeNode #gluster-dev (loadtheacc) ● Libraries and Tests Repo − git clone http://review.gluster.org/glusto-tests − Mirrored at http://github.com/gluster/glusto-tests ● Glusto Repo and Docs − http://github.com/loadtheaccumulator/glusto − http://glusto.readthedocs.io/