RestComm / smscgateway-docker

http://www.restcomm.com/
GNU Affero General Public License v3.0
0 stars 10 forks source link

assertions on logs through python #4

Closed c5c86a closed 7 years ago

c5c86a commented 7 years ago

It should get 401 (as in tadhack.restcomm.com) and not 200, but at least now we have a way to test an API call of SMSC

deruelle commented 7 years ago

@nicosmaris looks like the travis ci job failed ?

c5c86a commented 7 years ago

Indeed it is not ready for review.

I thought that the reason was missing a python library but we cannot check an HTTPS API call without SSL and SSL makes more sense when you have a domain address.

I will replace the logic of the test.py with finding at server.log the regex ".INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer).Started." and not the regex ".Not all SBB are running now.*"

If you don't mind, I suggest to keep this PR (instead of making a new one) and change the title.

c5c86a commented 7 years ago

@vetss which artifact should I use? 7.2.109 returns 'Not all SBB are running now'.

https://travis-ci.org/RestComm/smscgateway-docker/builds/194955346#L1076

The purpose of this PR is to have an automated way to check server.log for this message and the jboss started message. @leftyb can you take a look?

vetss commented 7 years ago

Hello @nicosmaris

If you check logs then you can see that "SBB are running now" next messages contain less SBB count then an initial one. So the provided log looks good for me (SBBs will finally start). This means that just appearance of the message "SBB are running now" does not 100% says that services are not started...

As for now I do not see a simple message that just says for 100% that all is started / not. If we do it we possibly need some extra functionality of internal SMSC GW code that will check all components and print an proper message into a log. But this is a topic for code ipdate.

c5c86a commented 7 years ago

Thanks @vetss, is it ok now?

vetss commented 7 years ago

Thanks @vetss, is it ok now?

SBB services have started. The most probably SMSC GW is started. Have you tested it with message exchange ?

c5c86a commented 7 years ago

No. Here that we don't have restcomm-connect how can test smsc gw with message exchange and without ui actions?

vetss commented 7 years ago

Hello @nicosmaris

for testing we can create for example ESME(s) or HTTP users, configure SMSC GW to pass traffic for example from ESME 1 to ESME 2 and try to send a message from SMPP application to ESME 1 and check if it comes to ESME 2 SMPP application.

And what do you mean "without ui actions" ? We usually need to have GUI / CLI access to configure SMSC GW.

c5c86a commented 7 years ago

I am trying to write a simple automated sanity test of the deployment process, so the GUI is not an option. Which CLI can help me on that?

vetss commented 7 years ago

When I was describing GUI and CLI I thought you need it for testing of SMSC GW for production, not sanity test. I am not sure you can run CLI by a script. It demands a special application usage.

Check for CLI interface "5.1.3. Shell - Command Line Interface (CLI)" chapter from http://documentation.telestax.com/core/ss7/SS7_Stack_Installation_Guide.html#installation-options.

c5c86a commented 7 years ago

@vetss no this is not for production. Having a CLI like ss7-cli.sh is fine as long as I can make sure (by checking the logs automatically as this PR does) that SMSC is up.

vetss commented 7 years ago

CASSANDRA_IP value is defined by configuring you can deploy a special config file into a data folder that will contain IP address (and other options) usage of both CASSANDRA_IP and current configuring may confuse SMSC GW if it contradicts each other file name is data/SmscManagement_smscproperties.xml - it contains a variaty of properities the best if you run the server locally and check a created file and then update and reuse of it

c5c86a commented 7 years ago

Thanks @vetss this XML file means that I won't need to edit the java to have cassandra in another IP, but I will post my findings on that issue.

As regards this PR, can you pull it?