Skip to content

Commit 3620430

Browse files
authored
Fix test execution of runner.py (#1262)
1 parent 933ee41 commit 3620430

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

tests/test-config-extra-network-and-duplicate-psu-providers.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ measurement:
8888
CPUChips: 1
8989
TDP: 60
9090
psu.energy.ac.xgboost.machine.provider.PsuEnergyAcXgboostMachineProvider:
91-
sampling_rate: 99
9291
CPUChips: 1
9392
HW_CPUFreq: 3200
9493
CPUCores: 4

tests/test-config.yml.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ measurement:
9090
sampling_rate: 99
9191
common:
9292
psu.energy.ac.xgboost.machine.provider.PsuEnergyAcXgboostMachineProvider:
93-
sampling_rate: 99
9493
CPUChips: 1
9594
HW_CPUFreq: 3200
9695
CPUCores: 4

tests/test_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def reset_db():
232232
pg_dbname = config['postgresql']['dbname']
233233
redis_port = config['redis']['port']
234234
subprocess.run(
235-
['docker', 'exec', '--user', 'postgres', 'test-green-coding-postgres-container', 'bash', '-c', f'psql -d {pg_dbname} --port {pg_port} -c \'DROP schema "public" CASCADE\' '],
235+
['docker', 'exec', '--user', 'postgres', 'test-green-coding-postgres-container', 'bash', '-c', f'psql -d {pg_dbname} --port {pg_port} -c \'DROP SCHEMA IF EXISTS "public" CASCADE\' '],
236236
check=True,
237237
stdout=subprocess.DEVNULL,
238238
stderr=subprocess.DEVNULL,

tests/test_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_reporters_still_running():
8585

8686
def test_template_website():
8787
ps = subprocess.run(
88-
['bash', '../run-template.sh', 'website', 'https://www.google.de', '--quick', '--config-override', f"{os.path.dirname(os.path.realpath(__file__))}/test-config.yml"],
88+
['bash', os.path.normpath(f"{GMT_DIR}/run-template.sh"), 'website', 'https://www.google.de', '--quick', '--config-override', f"{os.path.dirname(os.path.realpath(__file__))}/test-config.yml"],
8989
check=True,
9090
stderr=subprocess.PIPE,
9191
stdout=subprocess.PIPE,

0 commit comments

Comments
 (0)