Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
b012c7c3
Commit
b012c7c3
authored
Dec 26, 2020
by
Pavel Vainerman
Committed by
Pavel Vainerman
Jan 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tests
parent
2e01bbf4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
test_restapi_uniset.cc
extensions/tests/test_restapi_uniset.cc
+15
-3
IONotifyController.cc
src/Processes/IONotifyController.cc
+2
-3
No files found.
extensions/tests/test_restapi_uniset.cc
View file @
b012c7c3
...
...
@@ -14,12 +14,24 @@ using namespace uniset;
using
namespace
uniset
::
extensions
;
// -----------------------------------------------------------------------------
static
std
::
shared_ptr
<
SMInterface
>
shm
;
static
uniset
::
ObjectId
testOID
=
DefaultObjectId
;
static
ObjectId
aid
=
DefaultObjectId
;
static
const
std
::
string
aidName
=
"AI_AS"
;
// -----------------------------------------------------------------------------
static
void
init_test
()
{
shm
=
smiInstance
();
REQUIRE
(
shm
!=
nullptr
);
REQUIRE
(
uniset_conf
()
!=
nullptr
);
shm
=
smiInstance
();
REQUIRE
(
shm
!=
nullptr
);
auto
conf
=
uniset_conf
();
REQUIRE
(
conf
!=
nullptr
);
testOID
=
conf
->
getObjectID
(
"TestProc"
);
CHECK
(
testOID
!=
DefaultObjectId
);
aid
=
conf
->
getSensorID
(
aidName
);
CHECK
(
aid
!=
DefaultObjectId
);
}
// -----------------------------------------------------------------------------
TEST_CASE
(
"[REST API: conf]"
,
"[restapi][conf]"
)
...
...
src/Processes/IONotifyController.cc
View file @
b012c7c3
...
...
@@ -1322,13 +1322,12 @@ Poco::JSON::Object::Ptr IONotifyController::getConsumers(ObjectId sid, ConsumerL
* }
*/
Poco
::
JSON
::
Object
::
Ptr
jret
=
new
Poco
::
JSON
::
Object
();
uniset_rwmutex_rlock
lock
(
ci
.
mut
);
if
(
ci
.
clst
.
empty
()
&&
ifNotEmpty
)
return
jret
;
return
nullptr
;
Poco
::
JSON
::
Object
::
Ptr
jret
=
new
Poco
::
JSON
::
Object
();
auto
oind
=
uniset_conf
()
->
oind
;
auto
jsens
=
uniset
::
json
::
make_child
(
jret
,
"sensor"
);
jsens
->
set
(
"id"
,
sid
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment