one was actually a true positive. the others were false positives
and are going to be silenced for the time being, while we try to find
an upstream solution. more details can be found in the ticket.
Change-Id: Iae8df7606774a9d26e4d44dbba557c9fe62d2252
this is to fix the TAP tests of the sipwise QA chain
fixed (or ignored):
- ControlStructures::ProhibitMutatingListFunctions
- Documentation::RequirePodSections
- InputOutput::RequireEncodingWithUTF8Layer
- Subroutines::ProhibitSubroutinePrototypes
- BuiltinFunctions::ProhibitStringySplit
- TestingAndDebugging::ProhibitNoStrict
- TestingAndDebugging::ProhibitProlongedStrictureOverride
- InputOutput::ProhibitTwoArgOpen
- CodeLayout::ProhibitQuotedWordLists
Change-Id: I7dce4ce123bad40de2d9b51ba5b1a141e20c3783
* enables fetching captured sip data
GET all collection returns JSON with available SIP messages
GET item collection requires a valid call-id and
returns pcap data generated from the packets of the call-id
Change-Id: I552ee9a312a4b9acf95bde93f6c584bbf82f9ea9
this is to clean the Sipwise TAP tests for this repo
the critical places where undef is really the intended return value (because
a scalar should always be returned) the rule has been overridden
Change-Id: I66e217a03a00e0f366db9c0cbc5007dd15cd9f96
Fake_data keeps own test_machine, and when we change user
using runas in other test_machine instance - we need to
reinit cert files before request.
Change-Id: Idddeef2b0c10521c71ce5d77c5010f89c620185c
The code is currently broken due to the kamailio location migration
from mysql to redis. The test creates location record record using API
and it is properly created in Redis, later the test checks location
using another REST API request and find nothing:
> api-rest_api-subscriberregistrations_t.16 - subscriberregistrations:
> create test item 'subscriberregistrations' 1
> (Unprocessable Entity: Could not find a new registration entry in the db,
> that might be caused by the kamailio flush mechanism,
> where the item has been updated successfully)
The test should be re-enabled then ngcp-panel/REST code will use Redis
for location search.
Change-Id: I9706b8d04dcc2e2630d67b2622231ce726c4bc99
by using strict where it wasn't used before
plus fix all bugs that were discovered along the way by enabling strict
Change-Id: I7f9a8bf0cee74014fd7551ec26f2ab3922715efc
... to synchronized singleton
+ disable the 5 parallel checks in balanceintervals.t
-> it passes sometimes, sometimes not
.. too timing/load dependent.
Change-Id: I9255452f01465a0673182cf4e0a9b3f560660b73
"dpkg-query -s" doesn't give the desired answer, it includes packages
known to dpkg for different reasons, but does not exactly reply
whether they are installed or not, which is the intention of the code.
Change-Id: I84b4a6c4c7c84997c31b2bdb3f10e0fe9ab0b721
the reload of fakedata seems to require a path in the updated format.
Otherwise the command "do $filename" seems to not find the file.
Change-Id: I7751be6eaec2862a1547ee4ab70fb2b86a902f19
This reverts commit ca76144c4a.
The tests are fixed now, re-enable them on Jenkins using 'stable' set.
Change-Id: I7913a6feef183a14a404981ec10a457eb31d870b
This reverts commit 5988b51589.
The tests are fixed now, re-enable them on Jenkins using 'stable' set.
Change-Id: Ide5735bf42090c8176a4e20ecf538fcf2a698b60
Used to fetch whether pbx, faxserver, rtcengine etc is enabled.
* Fix rtcengine reseller creation:
- Refuse to create reseller if rtcengine part fails
- Use proper auto-generated rtcengine values (pass, domain)
to not fail on reseller names which are not forming valid
hostnames.
* Implement /api/admins/id to support testing
- add test
- fix creating admins with overly long login
- fix various ACL bugs handling /api/admins/
- fix creating /api/admincerts/ as r/o user
* Fix test framework
- use proper client cert when switching API user
Change-Id: I602fdd8181c0b3f23e76e3eab0df90a1ff9e986f
(cherry picked from commit 0d376bd8b59db65296090d26f2c84d704129beef)
* Fix syntax errors and internal errors
* Pass set ids back in mappings
* Allow updates of mappings both via name and ids
Change-Id: I26fdfe96d67563c11040a6c1e87f13a835bb793f
New Perl in stretch doesn't provide the method/hack to access variable,
we were using. Ira is searching for the fix here, so far temporary disabling the tests,
as the fix is not approaching this week. The commit must be reverted soonish.
Change-Id: Ib0fd290c6749df361638405589e9e5df6248394a
Recent switch to stretch in trunk makes it impossible to rebuild the image.
Also improve error handling here in case of removed ngcp-panel-tests-rest-api-build-deps
(docker will report an error in this case, previously it silently ignored that).
Change-Id: I51868265d0ff8fd646071ccff4fd380f2495d4d7
* Implement r/o access to /api/customers for subadmin
* Implement r/o access to /api/subscribers for subs
* Implement create access to /api/subscribers for subadmins
* Implement /api/numbers to re-assign a number
* Implement CF endpoints access for subs
* Implement new test framework to simplify testing
* Fix updating number by using Utils to make sure allowed_clis etc
are handled correctly
* Install missing docker dependencies for new test framework
* Add edr handling on /api/numbers/xx update
Change-Id: I678da16cfb1361b2809780cba8c204ac90bb1736
+ added conversations to api_root.t
+ disabled xmpp conversations source, since "soap"
MySQL user is not yet granted to prosody.* tables
Change-Id: I3d6a9418e7c2b77503f8472fe639e971ad7be3fa
Otherwise:
not ok 188 - check for valid link syntax
Use of uninitialized value $relname in exists at t/api-rest/api-root.t line 152.
Use of uninitialized value $relname in concatenation (.) or string at t/api-rest/api-root.t line 152.
not ok 189 - check for '' collection in Link
Use of uninitialized value $relname in delete at t/api-rest/api-root.t line 153.
Change-Id: Ib78e735e365b34404a06037b06dd7becdcf9917b
Which confuses developers which are debugging failed tests,
as details like below are not a part of XML Jenkins displays on a WEB:
> # Failed test 'create test customer w/o profile package'
> # at t/api-rest/api-balanceintervals.t line 1578.
> # got: '500'
> # expected: '201'
> Use of uninitialized value in concatenation (.) or string at t/api-rest/api-balanceintervals.t line 1580.
> Thread 4 terminated abnormally: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE HTML>\n<!-...") at /usr/share/perl5/JSON.pm line 171.
'man prove' says:
> -m, --merge Merge test scripts' STDERR with their STDOUT.
Change-Id: I945d4d8867fc9c061f96d067be14125af7cc5a46
checks comparing "now" timestamps generated by the .t and by api code
(eg. lnp number termination) fail randomly. it seems the
clocks of docker and the api node differ sometimes. this commit
tries to compensate by sending the .t time with requests.
Change-Id: Iaded3735e746dab166364a34ea8a5cda8c8e40ab
It's fine to remove read-only fields only if $run==1, but in any
case remove unknown fields.
Also the force-array change broke additional tests, fixed them.
Change-Id: I48ffcf201bd1eedb8fb317f1ca248af9e4a01e60
If no locally cached API cert is available, download one and use it
throughout all of the tests. Speed-up factor is ~3x.
Change-Id: I083985f4e4ec7d8f7f4e0beec3a604be80a4bb59
-introduce deferred event record insertion, to span across
update_subscriber_number and update_subadmin_sub_aliases
calls by handing over a snapshot of aliases before number
edit operations
-the snapshot is used to persist first_non_primary_alias_before
event values
-it also is the preparation to derive number change events
apart from that, the following was noticed:
-fix: start_huntgroup was generated twice
-fix: when terminating a subs, the order of end events was
not the reverse order of start_events
-POST /api/subscribers does not consider pbx alais selection
of pilot pool aliases, while terminating the susbcriber does
move back alaises to the pilot pool.
Change-Id: I092f4a21bed25503f48c47c253f1cae0729f43da
+preference-style 1:1 association api resource will
list all existing customer contracts
+avoiding get_customer_rs for performance reasons
+PUT/PATCH only, no POST/DELETE
Change-Id: If3b00c6cde07bf030e8bfc308e5e29d3251bdedd
Take [1] of the created members and groups, to avoid special pilot behavior.
Pilot don't keep pbx group members
Change-Id: Ib8fd599ffc53c9743d2c160d324f2110548bcea9
+ api/events resource
+ removing an autoattendant via /api/callforwards: events OK
+ removing an autoattendant via /api/cfdestiantions: OK
+ removing an autoattendant via /api/cfmappings: OK
Change-Id: I4c309753b9338582479dba9951f757bb2ecaad7e
+1. terminate if terminated contracts or subscribers exists
+2. if active contracts or subscribers -> error
+3. delete otherwise
+customer contact api DELETE
+customer contact testcases
+customer api POST
+customer api PUT/PATCH
+system contact api DELETE
+system contact testcases
+contract api POST
+contract api PUT/PATCH
+panel UI contact delete
+panel UI contract create
no change panel UI contract update
+panel UI customer create
no change panel UI customer update
note contact links like customers.omm_contact or customers.tech_contact
are not considered.
Change-Id: I19ea6e2245282485cc30d3e92d17a2eb603e0c2d
* I had to fix api-bannedusers.t otherwise it failed:
> ok 19 - bannedusers: check if all created test items have been foundin the list
> is_empty:1;ok 20 - fetch uri: https://10.15.20.74:1443/api/bannedusers/?page=1&rows=1 (OK: )
> $VAR1 = undef;
> ok 21 - Check that all added banned users were deleted 1..21 Failed 1/21 subtests
Change-Id: Ic9578c9f1ab20b2abeaa51656ed5556804228981
-undo unique lnp_numbers: undo misleading unique keys
-retain lnp_provider delete cascade restriction
-api: wire lnp_numbers_actual
-lnpnumbers collection pagination request takes several
seconds (up to tens of for 200k lnp numbers), too slow
especially for GET /api/lnpnumbers/?number=.. lookups
-query param is properly injected into the virtual view
sql query, so the lookup is fast now.
-panel UI custom datatable filter to switch between
complete history (all records) and actual portings
-"terminate" lnp number: DELETE /api/lnpnumbers/?number=x
+special use-case for melita's crm
+all empty or future "end" timestamps of records
are set to now(), so a subsequent listing shows no
records any more.
-number parameter is forced, other collection query params
are currently not supported for DELETE
Change-Id: I7b69d16a2d4f38ea84fc1cc0b407fa67e0f5ef8b
If set and a call is done within a pbx customer, the call is blocked
in blacklist, and is allowed in whitelist.
Change-Id: Ib43e5a45525a69e2b9dd9537dabddf10dfc006d1
File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:
| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
See https://github.com/docker/docker/issues/18355 and
https://github.com/docker/docker/pull/19490 for details.
Change-Id: I79fff0eead1a11f80b461791b2285a65d706262a