# Path: moduleframework/core.py
# DATADIR = ['usr', 'share', 'moduleframework']
# def is_debug():
# def is_not_silent():
# def print_info(*args):
# def print_debug(*args):
# 
# Path: moduleframework/module_framework.py
# PROFILE = None
# def skipTestIf(value, text="Test not intended for this module profile"):


import pexpect
import time
from avocado import main
from avocado.core import exceptions
from moduleframework import core, module_framework
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# he Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Authors: Jan Scotka <jscotka@redhat.com>
#



class SanityMemcached(module_framework.AvocadoTest):
    """
    :avocado: enable
    """

    def test_smoke(self):
        self.start()
        time.sleep(1)
        session = pexpect.spawn("telnet %s %s" % (self.ip_address, self.getConfig()['service']['port']))
        session.sendline('set Test 0 100 4\r\n\n')
        session.sendline('JournalDev\r\n\n')

# Path: moduleframework/core.py
# DATADIR = ['usr', 'share', 'moduleframework']
# def is_debug():
# def is_not_silent():
# def print_info(*args):
# def print_debug(*args):
# 
# Path: moduleframework/module_framework.py
# PROFILE = None
# def skipTestIf(value, text="Test not intended for this module profile"):


# Path: examples/openshift/template/memcached.py
import pexpect
import time
from avocado import main
from avocado.core import exceptions
from moduleframework import core, module_framework

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# he Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Authors: Jan Scotka <jscotka@redhat.com>
#



class SanityMemcached(module_framework.AvocadoTest):
    """
    :avocado: enable
    """

    def test_smoke(self):
        self.start()
        time.sleep(1)
        session = pexpect.spawn("telnet %s %s" % (self.ip_address, self.getConfig()['service']['port']))
        session.sendline('set Test 0 100 4\r\n\n')
        session.sendline('JournalDev\r\n\n')

        core.print_info('Expecting STORED')