diff --git a/test/__init__.py b/test/__init__.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..44f772595799f5fe338534918c95e23e08e80464 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 3d4b07736b3fa3b318754d411aaeb1d91aa2f537..5d7914f797b5024e74949a8ff5bab01457b4e2e5 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 0182e75dc99b9e9f28ffad87a0d4d40e5929d67b..2a375523af36c041db39dcfd69383a0c150ce860 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 2060a23d578d2b8cb278f9678a98b8e8430c92d5..5bf40672aa8a2f0594fb83202133b7743f5671fc 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 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..44f772595799f5fe338534918c95e23e08e80464 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 16c5ffa37cb65baac8cd6670c5a5a6dfb2422adf..de3ebaef1ef1c53b3471690b8a4f98af766266e1 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 217ceeb1030f1135245ebc9383e92f7d4127ccdc..efecd68bf0eac6c89b23320453d0b5425edc0c67 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 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..44f772595799f5fe338534918c95e23e08e80464 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 4fdb50ab1fecac6fb58ab39ed98ec063767667ff..4fe3bb9dc1298df611392594940a7efca95d2ddf 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 a3bf7d9832e26edf82ae7108ef4c8097bb013965..ea21ea9054143172ba27ab7492a4d4077d6a667d 100644 --- a/test/streaming/test_rspec.py +++ b/test/streaming/test_rspec.py @@ -1,3 +1,5 @@ +#!/usr/bin/python3 + import pytest import os