Since the recent change in templates (commit
b95a6ef4ecb9bc3abe44e54506c029569d5a393c) to let systemd-coredump be
able to write to the /var/lib/systemd/coredump directory, it has started
to change the permissions for that pathname 0755 in some circumstances.
This being a symlink, the permissions do not really matter, so we accept
the 0755 permissions matching the target directory (/ngcp-data/coredumps/)
and the 0777 permissions for a default symlink.
Change-Id: Ifc084cb56541e43bd9fa0245464606c1ca992c97
The ownership of nginx logs is www-data:adm. Also check empty files to
catch wrong permissions as soon as possible.
Change-Id: Icb9e1e1c9590bbef7021e3826a19419f7c21f9ce
We don't actually care whether the log files exists or not, we really
only care about their permissions and ownerships.
Change-Id: I094e9b262b4c4c775023beba79acd3787ec616ac
Remove log files that are not guaranteed to exist. Special case api.log
as it's owned by group _ngcp-li while also being optional.
Change-Id: Ie45a6039bbf120cc3b76ad63b9fd35310966ab48
The name of the variables SKIP_DNS_CHECK_TEST and
SKIP_STRICT_HOSTNAME_TEST so if they are 'true' the check should be
skipped. But in code it has direct branching, if the variable true -
run the test.
So add the negation to checks of these variables.
Change-Id: Iaf1e252dbb30cd2dc624db71742fa2cee8edb888
Also check that there are no expired keys
The key was used to sign repos for old unsupported releases.
Change-Id: Ia5dd91c4d8b2e54f4fc18626ef3968c95265bdf6
Sometimes there is divergence in schemes which are inevitable or
harmless.
So add exceptions' list which is easy to maintain. The format is the
following:
=================================
<element-type>/<schema-name>/<element-name>/<element-attribute>
Where:
element-type - tables, columns, views, etc
schema-name - name of the schema
element-name - name of the element (table, index, etc)
=================================
F.e.:
views/ldap/ldap_entries/view_definition
For columns columns/<schema-name>/<table-name>_<column-name>
columns/billing/table1_column1/is_nullable
Add 1st exception from TT#74728. The reason of this diff is that view
was created without schema name on sp1 but the replication statement was
written with schema name.
Change-Id: I29dd109cefb560fe89d92a430cd6522e4513f7d5
Use compare_dbs as a wrapper to check all the used schemes.
Add different formats of output to compare_dbs.pl - tap and human
readable one.
Process all the schemes in one run of compare_dbs.pl and do it in one db
connection.
If the tap formatter is used - output the result of all schemes in a
single file.
Change-Id: I2696680aa30b56658f130bd1cea116099c086753
Nowadays goss yml files are generated by ngcpcfg. But their content
depends on whether the node is active or not, which can change
dynamically during the lifetime of the generated files from the
templates. Which will make the goss checks fail when the node state
changes.
Switch the node state into a run-time variable, and use go template
support to parametrize this into the goss checks.
For the Template Toolkit values that get instantiated within the go
template conditionals, we need to make sure we always set a boolean
value, as the Template Toolkit will return undef on false values,
which would be considered a non-existining argument. Even though the
has_role method will always return either 0 or 1, we still force
a boolean value to make the code future-proof in case more logic is
added on the same check, which would then turn it into a Template
Toolkit boolean evaluation and possibly return nothing on false.
Change-Id: I19c3ef48f09c8d2e79613ef118adc362399a6e78
The semantics of the environment variables are different, as they are
always considered strings. The variables file makes it possible to
specify types, given that it's a yaml file. So the SKIP variables
will now be proper booleans.
Change-Id: Ibbc02c047fd743b8bff9a9da52cffd76db5d7524
The system test package is installed on a system so it's easier to
manage code and run the test as it's branched and no need to copy
scripts to system host.
Change-Id: I9ad3ff7fb16dd843d81a4c9ecfbbe1c0d42fe1c6
We get dangling symlink errors on a fresh installation as
/etc/ngcp-system-tests has not been generated yet, but we do not
currently have any users of the old /etc/ngcp-tests, so we can just
remove it.
Change-Id: I6c3369b6c4c948135ffcef608a1d358729b06e82
We are not matching to new prosody version 0.11.2-1 here as it can
be changed any time by Debian (as we migrated to upstream prosody version).
Also goss doesn't have support for regexps for 'versions' field,
so we cannot check something like:
> prosody:
> installed: true
> versions:
> - /0.11.2-.*/
After a long trying with goss 'matches/match-regexp/semver-constraint'
I decided to stop on the current version, where we inside old version is not available.
Change-Id: I626be7a23fd2b31d468f4cd9411530b24eb7216b
Let us introduce a system-wide symlink from /var/backup to /ngcp-data/backup, to
fix recurrent problems like the missing /var/backup/cdr or
/var/backup/ngcp-upgrade backups taking too much space.
This should have happened when changing the partition schema to use /ngcp-data/
and have a root partition with minimal amount of space, because there were
several paths migrated to /ngcp-data like /var/backup, and we failed to migrate
all those paths in sync with the change to the partitioning and also failed to
have a back-up solution like this symlink.
Some (hopefully most, or all!) of the problems have been sorted out by now, but
they've been biting us years after the change, like this TT#72908, so maybe it
can still save some pain in the future, and there's little cost to it.
Change-Id: Ief4ba33bf57bb5f02cc54b000b64540667ebba48
This new program is a wrapper to make running the tests easier, and it
will abstrat all necessary knowledge about the test runner.
We also remove the results file generation support, and let our caller
handle it as it simplifies the code overall.
Change-Id: Iad884429b00a94d5f3c9c3b37db31a523ab3c701
These are used by the tests themselves. We distinguish between core
and system dependencies for functionality we really want to check
which goes into Depends, and dependencies for stacks that are optional
and their missing presence will still emit an error due to the commands
not being available, these we add as Suggests.
Change-Id: I051dd388dab0a4a5c5f51f48dda54013298ba537
As the package is now installed by default, and we expect
«ngcpcfg build» to be executed after any installation upgrade anyway,
we can stop running this, more so now that we do not require any local
customization support.
Change-Id: Ic0984052f86e5aaddf384f36374fb259c946cb56
This is problematic because it can stomp over pre-existing host-specific
local files, which we'd end up removing. It also requires to run ngcpcfg
before being able to execute the tests.
We wwitch to use golang's text/template support for environment variables
so that we can stop using this hack.
Change-Id: I6c4d5b2efde2704d68a327d4df9af51bcb8fd964
Move the exporting of the variable to its own, and split the goss
execution into multiple lines to make it easier to modify and read.
Change-Id: I6bd1735dd3cb6e61807fafe1ccb54e48ca070dfb
The templates does not really contain any passwords, but the file
generated from it will, so having the template have restricted
permissions means the generated one will inherit them.
Change-Id: I0ed38509e2c17eb4fd174722a0d01d31f4ef2816
This makes it more obvious and discoverable what this files are about. We
install compat symlinks so that we do not break external components that
expect these pathnames.
Change-Id: I50643d08d19600767d14fa24e7da9b0f0be7eaef
As I can see Sipwise goss patches were accepted upstream and
we have new version there, let's use it for trunk/mr8.2+
Tested on CE/PRO and noticed no issues there with version 0.3.9.
Change-Id: Iceb858b1b3d0a575bfe6c6f2783ebb8d6bf1636f
It is staying here for a while and most probably is no longer necessary.
Let's remove it and see is it still topical, maybe we should consider to
fix it finally if it is topical. Anyway with muting here we are blind.
Change-Id: I87a8d65b5c7affebed027fc0b23983525d9b911d
- The /login/admin/ endpoint on web_int is on port 1443.
- The /login/subscriber/ endpoint on web_ext is on port 443.
- The /api/ endpoint check with user:pass on default ports should be
done on web_ext, as a similar test is already being done on web_int.
Change-Id: Ieb7f794288e52f3ac8a520d1cb3508f442648c36
These services are only supposed to be present on mgmt or li_dist nodes,
so there is no point in checking other nodes.
Change-Id: Ic7a83a30acc5078b6b2108d4393e73b7a4ce9612
Except for the mgmt nodes, each node exposes information only about
itself and its peer, so the keys and their indices depend on the nodes
involved.
Change-Id: I8562e87c246f98743d2e29e56da653da0b1b2bf6
These only make sense when they are at the end-of-line, so that no
newline gets included in the output, but never when surrounded by
other text.
Change-Id: Idd43b8e3d7de390cc1d8dc1e2c0b666012c66eba