ifw-ccf  3.0.0-pre2
Classes | Functions | Variables
test_utils Namespace Reference

Classes

class  TestCcfUtils
 Unit test of CCF command interface. More...
 

Functions

def create_log_file (logging_active, test="CcfIntTest")
 
def log_debug (logging_active, msg)
 
def redis_get (port, node)
 Read the value of a key from the associated Redis DB. More...
 
def ccf_read_oldb (uri, node)
 Read the value of a key from the associated OLDB (or internal DB). More...
 
def oldb_check_val_larger (uri, key, value, timeout, logging_active=False)
 Check that a value read in the OLDB is larger than the given value. More...
 
def send_cmd (uri, request, payload, timeout)
 Execute the client as a function. More...
 
def wait_for_state (uri, state, timeout, logging_active=False, test_name=None)
 Wait for the given state with the given timeout (s). More...
 
def create_dataroot (directory)
 Create the DATAROOT directory. More...
 
def check_verify_fits_file (fits_file)
 Check and verify the given FITS file. More...
 
def extract_rec_status_property (rec_status, property)
 Extract a specific feature from the RecStatus (YAML) ASCII dump. More...
 
def check_fits_cube_gen_help_page (option)
 Generate and check the command line help-page provided by ccfFitsCubeGen. More...
 
def invoke_fits_cube_gen_check (size, noise, magnitude, data_type, nb_of_images, max_shift_per_image, max_total_shift, output_file)
 Invoke the tool and check the generated file. More...
 

Variables

def val = oldb_check_val_larger(8989, 'TestCcf2.statistics.CcfProc1Pub3Thr.frame_count', 10)
 

Function Documentation

◆ ccf_read_oldb()

def test_utils.ccf_read_oldb (   uri,
  node 
)

Read the value of a key from the associated OLDB (or internal DB).

◆ check_fits_cube_gen_help_page()

def test_utils.check_fits_cube_gen_help_page (   option)

Generate and check the command line help-page provided by ccfFitsCubeGen.

◆ check_verify_fits_file()

def test_utils.check_verify_fits_file (   fits_file)

Check and verify the given FITS file.

◆ create_dataroot()

def test_utils.create_dataroot (   directory)

Create the DATAROOT directory.

◆ create_log_file()

def test_utils.create_log_file (   logging_active,
  test = "CcfIntTest" 
)

◆ extract_rec_status_property()

def test_utils.extract_rec_status_property (   rec_status,
  property 
)

Extract a specific feature from the RecStatus (YAML) ASCII dump.

◆ invoke_fits_cube_gen_check()

def test_utils.invoke_fits_cube_gen_check (   size,
  noise,
  magnitude,
  data_type,
  nb_of_images,
  max_shift_per_image,
  max_total_shift,
  output_file 
)

Invoke the tool and check the generated file.

Parameters corresponds to the command line options.

◆ log_debug()

def test_utils.log_debug (   logging_active,
  msg 
)

◆ oldb_check_val_larger()

def test_utils.oldb_check_val_larger (   uri,
  key,
  value,
  timeout,
  logging_active = False 
)

Check that a value read in the OLDB is larger than the given value.

Return "OK" if larger, otherwise "NOK".

◆ redis_get()

def test_utils.redis_get (   port,
  node 
)

Read the value of a key from the associated Redis DB.

◆ send_cmd()

def test_utils.send_cmd (   uri,
  request,
  payload,
  timeout 
)

Execute the client as a function.

◆ wait_for_state()

def test_utils.wait_for_state (   uri,
  state,
  timeout,
  logging_active = False,
  test_name = None 
)

Wait for the given state with the given timeout (s).

Variable Documentation

◆ val

def test_utils.val = oldb_check_val_larger(8989, 'TestCcf2.statistics.CcfProc1Pub3Thr.frame_count', 10)