Skip to content

Commit

Permalink
removed old env and scaffolding from test_plugin. new plugin runtime …
Browse files Browse the repository at this point in the history
…allows simpler running of plugins
  • Loading branch information
seanshahkarami committed Jul 20, 2020
1 parent 25fb343 commit e091cd3
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions test_plugin.sh
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()
'

0 comments on commit e091cd3

Please sign in to comment.