-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed old env and scaffolding from test_plugin. new plugin runtime …
…allows simpler running of plugins
- Loading branch information
1 parent
25fb343
commit e091cd3
Showing
1 changed file
with
7 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
#!/bin/bash -e | ||
|
||
# BUG This test relies on the internal detail that Plugin gets it's | ||
# env config before connecting to RabbitMQ. This is bad! | ||
# | ||
# What this leads to is expecting the config step to pass and then | ||
# the connection to fail, hence the except socket.gaierror. | ||
test_plugin_env() { | ||
# check for ennvironmental dependencies | ||
WAGGLE_PLUGIN_ID=1 \ | ||
WAGGLE_PLUGIN_VERSION=1.2.3 \ | ||
python3 -c ' | ||
python3 -c ' | ||
from waggle.plugin import Plugin | ||
import socket | ||
try: | ||
Plugin() | ||
except socket.gaierror: | ||
pass | ||
' | ||
} | ||
plugin = Plugin() | ||
for x in range(10): | ||
plugin.add_measurement({"id": 1, "sub_id": 2, "value": x}) | ||
test_plugin_env | ||
plugin.publish_measurements() | ||
' |