Testing files
authorSaurabh Agrawal <saurabhagrawal0412@gmail.com>
Sat, 16 Dec 2017 05:56:42 +0000 (00:56 -0500)
committerSuresh Marru <smarru@apache.org>
Sat, 16 Dec 2017 12:50:26 +0000 (07:50 -0500)
cwl-workflows/requirements.txt [new file with mode: 0644]
cwl-workflows/test.py [new file with mode: 0644]

diff --git a/cwl-workflows/requirements.txt b/cwl-workflows/requirements.txt
new file mode 100644 (file)
index 0000000..8501fa8
--- /dev/null
@@ -0,0 +1,3 @@
+requests==2.13.0
+six==1.10.0
+thrift==0.10.0
diff --git a/cwl-workflows/test.py b/cwl-workflows/test.py
new file mode 100644 (file)
index 0000000..34df387
--- /dev/null
@@ -0,0 +1,25 @@
+# Test script for api.py
+
+import api
+import configparser
+import sys
+
+
+def main():
+    """Main function
+    """
+    config_file = sys.argv[1]
+    config = configparser.ConfigParser()
+    config.read(config_file)
+    username = config['credentials']['Username']
+    access_token = config['credentials']['AccessToken']
+    gateway_id = config['config']['GatewayID']
+    hostname = config['config']['HostName']
+    port = config['config']['Port']
+    experiment_id = config['config']['ExperimentID']
+
+    api.launch_experiment(hostname, port, username, access_token, experiment_id, gateway_id)
+
+
+if __name__ == '__main__':
+    main()