REST: Node and item manipulation using REST API - JSON - #4728

Test duration: 8.942s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.099s
2020-07-15 23:12:26 |

2020-07-15 23:12:26 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:26 | ------------------------------------

2020-07-15 23:12:26 | [Mutex] waiting for: [configured:node:node-44a03fcb-f9b6-423c-8858-fea2a8a0b974:node-39b451fc-4a15-44c7-960a-0110074a66ba]

2020-07-15 23:12:26 | [Mutex] received everything.

2020-07-15 23:12:26 | [Mutex] isItemNotified: configured:node:node-44a03fcb-f9b6-423c-8858-fea2a8a0b974:node-39b451fc-4a15-44c7-960a-0110074a66ba :: true

2020-07-15 23:12:27 | [Mutex] waiting for: [received:nodes:0c802151-747b-4a9d-9ee4-4d2537e98c3b:localhost]

2020-07-15 23:12:27 | [Mutex] received everything.

2020-07-15 23:12:27 | [Mutex] isItemNotified: received:node:0c802151-747b-4a9d-9ee4-4d2537e98c3b:localhost:node-44a03fcb-f9b6-423c-8858-fea2a8a0b974:Node 44a03fcb-f9b6-423c-8858-fea2a8a0b974 :: true

2020-07-15 23:12:27 | [Mutex] waiting for: [received:nodes:d3b1f7da-5b68-425f-8aef-3fef09917bc8:localhost]

2020-07-15 23:12:27 | [Mutex] received everything.

2020-07-15 23:12:27 | [Mutex] isItemNotified: received:node:d3b1f7da-5b68-425f-8aef-3fef09917bc8:localhost:node-44a03fcb-f9b6-423c-8858-fea2a8a0b974:Node 44a03fcb-f9b6-423c-8858-fea2a8a0b974 :: false

createNodes 1.615s
2020-07-15 23:12:23 |

2020-07-15 23:12:23 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:23 | ------------------------------------

2020-07-15 23:12:24 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@test-domain.com",
    "pubsub#node_type": "leaf",
    "node": "node-44a03fcb-f9b6-423c-8858-fea2a8a0b974",
    "pubsub#title": "Node 44a03fcb-f9b6-423c-8858-fea2a8a0b974"
}

2020-07-15 23:12:24 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-07-15 23:12:25 | [Mutex] waiting for: [received:nodes:1c3428b6-6cae-4858-bdee-a7fb1a9548a6:localhost]

2020-07-15 23:12:25 | [Mutex] received everything.

2020-07-15 23:12:25 | [Mutex] isItemNotified: received:node:1c3428b6-6cae-4858-bdee-a7fb1a9548a6:localhost:node-44a03fcb-f9b6-423c-8858-fea2a8a0b974:Node 44a03fcb-f9b6-423c-8858-fea2a8a0b974 :: true

createSubnodes 1.027s
2020-07-15 23:12:25 |

2020-07-15 23:12:25 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:25 | ------------------------------------

2020-07-15 23:12:25 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@test-domain.com",
    "pubsub#node_type": "collection",
    "node": "node-39b451fc-4a15-44c7-960a-0110074a66ba",
    "pubsub#title": "Node 39b451fc-4a15-44c7-960a-0110074a66ba"
}

2020-07-15 23:12:25 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-07-15 23:12:26 | [Mutex] waiting for: [received:nodes:4b3310cf-2f3c-4c0b-b199-1d335eae917a:localhost]

2020-07-15 23:12:26 | [Mutex] received everything.

2020-07-15 23:12:26 | [Mutex] isItemNotified: received:node:4b3310cf-2f3c-4c0b-b199-1d335eae917a:localhost:node-39b451fc-4a15-44c7-960a-0110074a66ba:Node 39b451fc-4a15-44c7-960a-0110074a66ba :: true

deleteNodes 1.022s
2020-07-15 23:12:30 |

2020-07-15 23:12:30 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:30 | ------------------------------------

2020-07-15 23:12:30 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-39b451fc-4a15-44c7-960a-0110074a66ba"
}

2020-07-15 23:12:30 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-07-15 23:12:31 | [Mutex] waiting for: [received:nodes:da00449c-6ef6-4128-9f69-325fa3b19725:localhost]

2020-07-15 23:12:31 | [Mutex] received everything.

2020-07-15 23:12:31 | [Mutex] isItemNotified: received:node:da00449c-6ef6-4128-9f69-325fa3b19725:localhost:node-39b451fc-4a15-44c7-960a-0110074a66ba:Node 39b451fc-4a15-44c7-960a-0110074a66ba :: false

deleteSubnodes 1.025s
2020-07-15 23:12:29 |

2020-07-15 23:12:29 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:29 | ------------------------------------

2020-07-15 23:12:29 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-44a03fcb-f9b6-423c-8858-fea2a8a0b974"
}

2020-07-15 23:12:29 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-07-15 23:12:30 | [Mutex] waiting for: [received:nodes:674085a3-61be-4d79-a05e-74e7a7894caf:localhost]

2020-07-15 23:12:30 | [Mutex] received everything.

2020-07-15 23:12:30 | [Mutex] isItemNotified: received:node:674085a3-61be-4d79-a05e-74e7a7894caf:localhost:node-44a03fcb-f9b6-423c-8858-fea2a8a0b974:Node 44a03fcb-f9b6-423c-8858-fea2a8a0b974 :: false

2020-07-15 23:12:30 | [Mutex] waiting for: [received:nodes:4f58112d-b622-425d-b3e5-73e4399fb2cf:localhost]

2020-07-15 23:12:30 | [Mutex] received everything.

2020-07-15 23:12:30 | [Mutex] isItemNotified: received:node:4f58112d-b622-425d-b3e5-73e4399fb2cf:localhost:node-44a03fcb-f9b6-423c-8858-fea2a8a0b974:Node 44a03fcb-f9b6-423c-8858-fea2a8a0b974 :: false

publishItemsToNodes 0.044s
2020-07-15 23:12:28 |

2020-07-15 23:12:28 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:28 | ------------------------------------

2020-07-15 23:12:28 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-44a03fcb-f9b6-423c-8858-fea2a8a0b974",
    "entry": "<test>item-7f4f410c-3719-4f75-8996-1991969e6c00</test>",
    "item-id": "item-7f4f410c-3719-4f75-8996-1991969e6c00"
}

2020-07-15 23:12:28 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-7f4f410c-3719-4f75-8996-1991969e6c00"
}

2020-07-15 23:12:28 | [Mutex] waiting for: [published:item:notifieditem-7f4f410c-3719-4f75-8996-1991969e6c00:admin@test-domain.com]

2020-07-15 23:12:28 | [Mutex] received everything.

2020-07-15 23:12:28 | [Mutex] isItemNotified: published:item:notifieditem-7f4f410c-3719-4f75-8996-1991969e6c00:admin@test-domain.com :: true

retractItemsFromNodes 0.060s
2020-07-15 23:12:28 |

2020-07-15 23:12:28 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:28 | ------------------------------------

2020-07-15 23:12:28 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-44a03fcb-f9b6-423c-8858-fea2a8a0b974",
    "item-id": "item-7f4f410c-3719-4f75-8996-1991969e6c00"
}

2020-07-15 23:12:28 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-7f4f410c-3719-4f75-8996-1991969e6c00"
}

2020-07-15 23:12:28 | [Mutex] received everything.

2020-07-15 23:12:28 | [Mutex] isItemNotified: retracted:item:notifieditem-7f4f410c-3719-4f75-8996-1991969e6c00:admin@test-domain.com :: true

retrieveItemsFromNodes 0.054s
2020-07-15 23:12:28 |

2020-07-15 23:12:28 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:28 | ------------------------------------

2020-07-15 23:12:28 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-44a03fcb-f9b6-423c-8858-fea2a8a0b974",
    "item-id": "item-7f4f410c-3719-4f75-8996-1991969e6c00"
}

2020-07-15 23:12:28 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-44a03fcb-f9b6-423c-8858-fea2a8a0b974",
    "item-id": "item-7f4f410c-3719-4f75-8996-1991969e6c00",
    "item": [
        "<item id=\"item-7f4f410c-3719-4f75-8996-1991969e6c00\"><test>item-7f4f410c-3719-4f75-8996-1991969e6c00</test></item>"
    ]
}

2020-07-15 23:12:28 | [Mutex] notify: [retrieved:item:item-7f4f410c-3719-4f75-8996-1991969e6c00:payload-matches:true:localhost]

2020-07-15 23:12:28 | [Mutex] received everything.

2020-07-15 23:12:28 | [Mutex] isItemNotified: retrieved:item:item-7f4f410c-3719-4f75-8996-1991969e6c00:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.048s
2020-07-15 23:12:28 |

2020-07-15 23:12:28 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:28 | ------------------------------------

2020-07-15 23:12:28 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@test-domain.com"
}

2020-07-15 23:12:28 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "test",
        "node-39b451fc-4a15-44c7-960a-0110074a66ba",
        "node-44a03fcb-f9b6-423c-8858-fea2a8a0b974"
    ]
}

retrieveUserSubscriptionsWithRegex 0.060s
2020-07-15 23:12:28 |

2020-07-15 23:12:28 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:28 | ------------------------------------

2020-07-15 23:12:28 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@test-domain.com",
    "node-pattern": "(?!node-44a03fcb-f9b6-423c-8858-fea2a8a0b974)"
}

2020-07-15 23:12:28 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.014s
2020-07-15 23:12:27 |

2020-07-15 23:12:27 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:27 | ------------------------------------

2020-07-15 23:12:27 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-44a03fcb-f9b6-423c-8858-fea2a8a0b974",
    "jids": [
        "admin@test-domain.com"
    ]
}

2020-07-15 23:12:27 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.056s
2020-07-15 23:12:28 |

2020-07-15 23:12:28 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-07-15 23:12:28 | ------------------------------------

2020-07-15 23:12:28 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-44a03fcb-f9b6-423c-8858-fea2a8a0b974",
    "jids": [
        "admin@test-domain.com"
    ]
}

2020-07-15 23:12:28 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}