Add test script for thingclasses
This commit is contained in:
parent
d71ce85f12
commit
173c318dd3
@ -235,7 +235,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
// If running in a snappy environment, print out some details about it.
|
||||
if (!qgetenv("SNAP").isEmpty()) {
|
||||
if (!qEnvironmentVariableIsEmpty("SNAP")) {
|
||||
// Note: http://snapcraft.io/docs/reference/env
|
||||
qCInfo(dcApplication()) << "Snap name :" << qgetenv("SNAP_NAME");
|
||||
qCInfo(dcApplication()) << "Snap version :" << qgetenv("SNAP_VERSION");
|
||||
|
||||
21
tests/scripts/getthingclasses.sh
Executable file
21
tests/scripts/getthingclasses.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z $1 ]; then
|
||||
echo "usage: $0 host <token>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $2 ]; then
|
||||
cat <<EOD | nc $1 2223
|
||||
{"id":0, "method":"JSONRPC.Hello"}
|
||||
{"id":1, "method":"Integrations.GetThingClasses"}
|
||||
EOD
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cat <<EOD | nc $1 2222
|
||||
{"id":0, "method":"JSONRPC.Hello"}
|
||||
{"id":1, "token": "$2", "method":"Integrations.GetThingClasses"}
|
||||
EOD
|
||||
|
||||
|
||||
Reference in New Issue
Block a user