Skip to content
Snippets Groups Projects
Commit 5ed121cf authored by MJB's avatar MJB
Browse files

removed rspec files

parent 4d8bc2d9
No related branches found
No related tags found
No related merge requests found
File deleted
import pytest
import yaml
@pytest.fixture(scope="module")
def streaming_config():
"""Returns the service configuration deployed for streaming test"""
with open("test/rspec/rspec.yml", 'r') as stream:
data_loaded = yaml.load(stream)
return data_loaded
\ No newline at end of file
hosts:
- name: clmc-service
cpus: 1
memory: 2048
disk: "10GB"
forward_ports:
- guest: 8086
host: 8086
- guest: 8888
host: 8888
- guest: 9092
host: 9092
ip_address: "192.168.50.10"
- name: nginx1
cpus: 1
memory: 2048
disk: "10GB"
service_name: "nginx"
forward_ports:
- guest: 80
host: 8081
ip_address: "192.168.50.11"
location: "DC1"
sfc_id: "MS_Template_1"
sfc_id_instance: "MS_I1"
sf_id: "adaptive_streaming"
sf_id_instance: "adaptive_streaming_I1"
ipendpoint_id: "adaptive_streaming_I1_nginx1"
influxdb_url: "http://192.168.50.10:8086"
database_name: "CLMCMetrics"
- name: nginx2
cpus: 1
memory: 2048
disk: "10GB"
service_name: "nginx"
forward_ports:
- guest: 80
host: 8082
ip_address: "192.168.50.12"
location: "DC2"
sfc_id: "MS_Template_1"
sfc_id_instance: "MS_I1"
sf_id: "adaptive_streaming"
sf_id_instance: "adaptive_streaming_I1"
ipendpoint_id: "adaptive_streaming_I1_nginx2"
influxdb_url: "http://192.168.50.10:8086"
database_name: "CLMCMetrics"
- name: loadtest-streaming
cpus: 2
memory: 4096
disk: "10GB"
service_name: "loadtest-streaming"
forward_ports:
- guest: 80
host: 8083
ip_address: "192.168.50.13"
location: "DC1"
sfc_id: "MS_Template_1"
sfc_id_instance: "MS_I1"
sf_id: "adaptive_streaming_client"
sf_id_instance: "adaptive_streaming_I1"
ipendpoint_id: "adaptive_streaming_I1_client1"
influxdb_url: "http://192.168.50.10:8086"
database_name: "CLMCMetrics"
import pytest
import os
def test_service_names(streaming_config):
print(streaming_config['hosts'][0]['name'])
assert streaming_config['hosts'][0]['name'] == 'clmc-service'
assert streaming_config['hosts'][1]['name'] == 'nginx1'
assert streaming_config['hosts'][2]['name'] == 'nginx2'
assert streaming_config['hosts'][3]['name'] == 'loadtest-streaming'
def test_ping(streaming_config):
"""This test will only run on linux"""
for x in streaming_config['hosts']:
print(x['ip_address'])
response = os.system("ping -c 1 " + x['ip_address'])
assert response == 0
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="3.2" jmeter="3.3 r1808647">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="StreamingGroupApache1" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<intProp name="LoopController.loops">-1</intProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">50</stringProp>
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
<longProp name="ThreadGroup.start_time">1518691643000</longProp>
<longProp name="ThreadGroup.end_time">1518691643000</longProp>
<boolProp name="ThreadGroup.scheduler">true</boolProp>
<stringProp name="ThreadGroup.duration">20</stringProp>
<stringProp name="ThreadGroup.delay">0</stringProp>
</ThreadGroup>
<hashTree>
<SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="VLC Client" enabled="true">
<boolProp name="SystemSampler.checkReturnCode">false</boolProp>
<stringProp name="SystemSampler.expectedReturnCode">0</stringProp>
<stringProp name="SystemSampler.command">cvlc</stringProp>
<elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="Argument">
<stringProp name="Argument.name"></stringProp>
<stringProp name="Argument.value">-Vdummy</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="" elementType="Argument">
<stringProp name="Argument.name"></stringProp>
<stringProp name="Argument.value">--no-audio</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="" elementType="Argument">
<stringProp name="Argument.name"></stringProp>
<stringProp name="Argument.value">http://192.168.50.11/test_video/stream.mpd</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="SystemSampler.directory"></stringProp>
<stringProp name="SystemSampler.stdout">stdout${__threadNum}</stringProp>
<longProp name="SystemSampler.timeout">20000</longProp>
</SystemSampler>
<hashTree/>
</hashTree>
</hashTree>
<WorkBench guiclass="WorkBenchGui" testclass="WorkBench" testname="WorkBench" enabled="true">
<boolProp name="WorkBench.save">true</boolProp>
</WorkBench>
<hashTree/>
</hashTree>
</jmeterTestPlan>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment