How to use get_kcl_jar_path method in localstack

Best Python code snippet using localstack_python

kclipy_helper.py

Source:kclipy_helper.py Github

copy

Full Screen

...8def get_dir_of_file(f):9 return os.path.dirname(os.path.abspath(f))10def get_kcl_dir():11 return get_dir_of_file(kcl.__file__)12def get_kcl_jar_path():13 jars = ':'.join(glob(os.path.join(get_kcl_dir(), 'jars', '*jar')))14 return jars15def get_kcl_classpath(properties=None, paths=[]):16 """17 Generates a classpath that includes the location of the kcl jars, the18 properties file and the optional paths.19 :type properties: str20 :param properties: Path to properties file.21 :type paths: list22 :param paths: List of strings. The paths that will be prepended to the classpath.23 :rtype: str24 :return: A java class path that will allow your properties to be25 found and the MultiLangDaemon and its deps and26 any custom paths you provided.27 """28 # First make all the user provided paths absolute29 paths = [os.path.abspath(p) for p in paths]30 # We add our paths after the user provided paths because this permits users to31 # potentially inject stuff before our paths (otherwise our stuff would always32 # take precedence).33 paths.append(get_kcl_jar_path())34 if properties:35 # Add the dir that the props file is in36 dir_of_file = get_dir_of_file(properties)37 paths.append(dir_of_file)38 # add path of custom java code39 dir_name = os.path.dirname(os.path.realpath(__file__))40 paths.append(os.path.realpath(os.path.join(dir_name, 'java')))41 paths.insert(0, os.path.realpath(os.path.join(dir_name, '..', '..',42 'infra', 'amazon-kinesis-client', 'aws-java-sdk-sts.jar')))43 return ':'.join([p for p in paths if p != ''])44def get_kcl_app_command(java, multi_lang_daemon_class, properties, paths=[]):45 """46 Generates a command to run the MultiLangDaemon.47 :type java: str...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful