From 8e7c45f576f4d187234c2c5793613c16f1f21164 Mon Sep 17 00:00:00 2001
From: MJB <mjb@it-innovation.soton.ac.uk>
Date: Fri, 2 Mar 2018 13:10:36 +0000
Subject: [PATCH] Added shebang to all python scripts

---
 test/__init__.py                            | 1 +
 test/streaming-sim/LineProtocolGenerator.py | 2 ++
 test/streaming-sim/StreamingSim.py          | 2 ++
 test/streaming-sim/VerifySimResults.py      | 2 ++
 test/streaming-sim/__init__.py              | 1 +
 test/streaming-sim/conftest.py              | 9 ++++++---
 test/streaming-sim/test_rspec.py            | 5 +++--
 test/streaming/__init__.py                  | 1 +
 test/streaming/conftest.py                  | 2 ++
 test/streaming/test_rspec.py                | 2 ++
 10 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/test/__init__.py b/test/__init__.py
index e69de29..44f7725 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/python3
\ No newline at end of file
diff --git a/test/streaming-sim/LineProtocolGenerator.py b/test/streaming-sim/LineProtocolGenerator.py
index 3d4b077..5d7914f 100644
--- a/test/streaming-sim/LineProtocolGenerator.py
+++ b/test/streaming-sim/LineProtocolGenerator.py
@@ -1,3 +1,5 @@
+#!/usr/bin/python3
+
 # line protocol
 
 # Method to create a full InfluxDB request statement (based on partial statement from client)
diff --git a/test/streaming-sim/StreamingSim.py b/test/streaming-sim/StreamingSim.py
index 0182e75..2a37552 100644
--- a/test/streaming-sim/StreamingSim.py
+++ b/test/streaming-sim/StreamingSim.py
@@ -1,3 +1,5 @@
+#!/usr/bin/python3
+
 import LineProtocolGenerator as lp
 import time
 import urllib.parse
diff --git a/test/streaming-sim/VerifySimResults.py b/test/streaming-sim/VerifySimResults.py
index 2060a23..5bf4067 100644
--- a/test/streaming-sim/VerifySimResults.py
+++ b/test/streaming-sim/VerifySimResults.py
@@ -1,3 +1,5 @@
+#!/usr/bin/python3
+
 import sys
 import urllib.parse
 import urllib.request
diff --git a/test/streaming-sim/__init__.py b/test/streaming-sim/__init__.py
index e69de29..44f7725 100644
--- a/test/streaming-sim/__init__.py
+++ b/test/streaming-sim/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/python3
\ No newline at end of file
diff --git a/test/streaming-sim/conftest.py b/test/streaming-sim/conftest.py
index 16c5ffa..de3ebae 100644
--- a/test/streaming-sim/conftest.py
+++ b/test/streaming-sim/conftest.py
@@ -1,11 +1,14 @@
+#!/usr/bin/python3
+
 import pytest
 import yaml
 
 @pytest.fixture(scope="module",
-                params=['test/streaming-sim/rspec.yml'])
+                params=[{'config1': {'rspec': 'test/streaming-sim/rspec.yml', 'id': 'myid'}}])
 def streaming_sim_config(request):
     """Returns the service configuration deployed for the streaming simulation test. In future this needs to be a parameterised fixture shared with other rspec.yml based tests"""
-    print(request.param)
-    with open(request.param, 'r') as stream:
+    print(request.param['config1']['rspec'])
+    print(request.param['config1']['id'])    
+    with open(request.param['config1']['rspec'], 'r') as stream:
         data_loaded = yaml.load(stream)
     return data_loaded
\ No newline at end of file
diff --git a/test/streaming-sim/test_rspec.py b/test/streaming-sim/test_rspec.py
index 217ceeb..efecd68 100644
--- a/test/streaming-sim/test_rspec.py
+++ b/test/streaming-sim/test_rspec.py
@@ -1,3 +1,5 @@
+#!/usr/bin/python3
+
 import pytest
 import os
 
@@ -12,5 +14,4 @@ def test_ping(streaming_sim_config):
     for x in streaming_sim_config['hosts']:
         print(x['ip_address'])
         response = os.system("ping -c 1 " + x['ip_address'])
-        assert response == 0     
-    
+        assert response == 0     
\ No newline at end of file
diff --git a/test/streaming/__init__.py b/test/streaming/__init__.py
index e69de29..44f7725 100644
--- a/test/streaming/__init__.py
+++ b/test/streaming/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/python3
\ No newline at end of file
diff --git a/test/streaming/conftest.py b/test/streaming/conftest.py
index 4fdb50a..4fe3bb9 100644
--- a/test/streaming/conftest.py
+++ b/test/streaming/conftest.py
@@ -1,3 +1,5 @@
+#!/usr/bin/python3
+
 import pytest
 import yaml
 
diff --git a/test/streaming/test_rspec.py b/test/streaming/test_rspec.py
index a3bf7d9..ea21ea9 100644
--- a/test/streaming/test_rspec.py
+++ b/test/streaming/test_rspec.py
@@ -1,3 +1,5 @@
+#!/usr/bin/python3
+
 import pytest
 import os
 
-- 
GitLab