aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2020-06-10Update Mass PNF simulator documentationBartek Grzybowski1-7/+11
Change-Id: I8b583e958f445965eead876925e8eb385e655eb5 Issue-ID: INT-1617 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-10Drop action methods decoratorBartek Grzybowski1-24/+0
It's no longer needed after implementing all lifecycle modes in module. Change-Id: Ic2b0c638172e9bb1428ac1f3a7823ce3e36ac206 Issue-ID: INT-1617 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-10Setup and start docker-compose simulator app directly in Python moduleBartek Grzybowski2-10/+18
Change-Id: I5efaaa69a0c78d9ae9594d1e59d57dd9315613af Issue-ID: INT-1617 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-10Chown vsftpd config file to root while bootstrappingBartek Grzybowski2-2/+11
Change-Id: I48716f544bd34b05a5524b58500cdff7c96a9578 Issue-ID: INT-1617 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-10Add internal routine for logs archivingBartek Grzybowski1-2/+26
Change-Id: Ibbb2b4aa71f0ca477b7129e4037cee031e44ae91 Issue-ID: INT-1617 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-10Remove useless RUNNING_COMPOSE_CONFIG assignmentBartek Grzybowski1-1/+0
Change-Id: I0d66fab438ef53c716ddcebf292309f3a161a51e Issue-ID: INT-1617 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-10Drop shell debug mode in command wrapper methodBartek Grzybowski1-2/+2
Change-Id: I70133119ca8344ad675400e1ea9ba1b8a6f9b38b Issue-ID: INT-1617 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-05Support stopping sending PNF registration messages in Python moduleBartek Grzybowski4-7/+61
Change-Id: Iae7d300e6e09d152b6e7daaebd9c85ba763fc077 Issue-ID: INT-1613 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-05Add test case for invalid '--count' option valueBartek Grzybowski1-0/+18
Change-Id: Ib46c26889f01ce0cd9d90865070d5c5ac9b5d08a Issue-ID: INT-1613 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-05Drop shell wrapper for 'trigger_custom' action as wellBartek Grzybowski2-11/+14
Change-Id: I388038656505c6937e10ba9f65d70d0e6514e17b Issue-ID: INT-1611 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-05Support triggering simulator app directly from MassPnfSim moduleBartek Grzybowski3-26/+40
Change-Id: Ice52848bedf8722aa142de74342190378ea593cd Issue-ID: INT-1611 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-05Drop shell wrapper for stopping simulator instancesBartek Grzybowski2-15/+47
Instance method is added to manage stopping simulator instances and ROP scripts directly in MassPnfSim class. Change-Id: Ic551f99c0f5f2a177b9c72daac02690b0bbded04 Issue-ID: INT-1610 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-02Add helper routine for getting iter range in lifecycle methodsBartek Grzybowski1-5/+9
Change-Id: I3973b7bfd75885bf22154670a6b9f665769470fa Issue-ID: INT-1610 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-02Drop shell wrapper for getting simulators statusBartek Grzybowski2-14/+37
Change-Id: Id7c3c614d472d8ee01533e9bd146f258813e7cbe Issue-ID: INT-1606 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-02Add helper method to get running docker containers names listBartek Grzybowski2-1/+11
Change-Id: I8346302706d6e896b55d845051fe2de18aaafd16 Issue-ID: INT-1606 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-06-02Add helper method to get simulator instance dataBartek Grzybowski3-2/+13
Superfluous call to 'get_pnfsim_ip' function in simulator.sh was also removed. Change-Id: Ifd7be4843fe26768f4b86b64e07d2d9479735ad1 Issue-ID: INT-1606 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-29Remove postman subdirectorymrichomme25-9967/+0
The postman suite has not been updated for Frankfurt They are defacto deprecated This shoudl be cherry picked in Frankfurt However the suite will remain in El Alto and previous versions Issue-ID: INT-1608 Signed-off-by: mrichomme <morgan.richomme@orange.com> Change-Id: Id1ee003e023e8c35d7f5439f1a525ee039fb6b2f
2020-05-29Update vCPE Tosca use casemrichomme1-0/+76
- fix documentation - add install script for oclip Issue-ID: INT-1355 Signed-off-by: mrichomme <morgan.richomme@orange.com> Change-Id: Ieaeac5caf76caf6f731a6c2bf6380e8f8f2a6c6a
2020-05-25Add functional tests for verifying simulator services statusBartek Grzybowski4-1/+36
Status is verified after each lifecycle change for proper subcommand action. Change-Id: Ia1c0e1bce24ddf1ca2c805a420e4a0665412aedf Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-25Add functional test for 'clean' subcommandBartek Grzybowski2-0/+10
Change-Id: Iac2b7d5f912b22c6c4b342e350a71ee6ad8b1fbb Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-25Add functional tests for 'stop' subcommandBartek Grzybowski1-0/+21
Change-Id: Id3640c494f21fb4869fcf412dc83824dc8670d12 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-25Add tests for 'trigger_custom' subcommandBartek Grzybowski3-0/+27
Change-Id: I7a2811618adcaaa698a702d264ef2a93bc899704 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-25Add functional tests for 'trigger' commandBartek Grzybowski1-0/+18
Change-Id: Ie3f0a5c5b5276c058da3d284d5531ab5c821e3b8 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-25Add functional tests for 'start' commandBartek Grzybowski1-0/+18
Change-Id: I6a0e6bf35384e861511972aab45faed2fa13a90e Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-25Add functional tests for bootstrap commandsBartek Grzybowski1-0/+60
Change-Id: Idb816780206f8b3b7a14128b7fd4603c4977ce11 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-25Add pytest fixturesBartek Grzybowski1-0/+30
This adds fixtures that'll be utilised by unit and functional tests. Change-Id: Iaeed869d8320ccc44d485fc00c590741352e34e6 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-25Remove fixture declaration that is defined in pytest configBartek Grzybowski1-5/+0
Change-Id: I37abc052df5f69907ceb9bb81fbc478126e115d5 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-25Add 'pyyaml' dependency in 'pytest' tox envBartek Grzybowski1-3/+3
Change-Id: I07d326aabe2ad70eb269b5236d2fe6af1a958824 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-25Add pytest testing scenario settings for simulatorBartek Grzybowski1-0/+6
Change-Id: I57d67a837aa3ef8d6a58e5abbb61bfc3606e93dc Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-25Drop shell 'rm' command and use 'rmtree' native Python routineBartek Grzybowski1-5/+6
Change-Id: Id5487723b8eb6fdc065ffe712907f9a715f610c5 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-20Add tests for CLI script optionsBartek Grzybowski2-1/+48
Change-Id: Iea4b353b37297e04b686d41b3494b00f61cfb9f3 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-20Create setuptools based Python env setup for the scriptsBartek Grzybowski6-14/+57
Change-Id: I00095182de5532c28fd7d9605de2d9c8b29f6c1c Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-19Iterate over all bootstrapped instances by defaultBartek Grzybowski1-10/+31
Commands that support '--count' option now iterate over all autodetected bootstrapped simulator instances by default, not just the first one. Change-Id: Ia5703047447b4da98d775636fe38911f81520848 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-19Add a method to enumerate bootstrapped simulator instancesBartek Grzybowski1-0/+6
Change-Id: Ifbafc748a47b1db3fabfb337b44a66523c9ef80f Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-18Make the actions decorator a static method in a subclassBartek Grzybowski1-26/+29
Change-Id: I2bd702ff1d92c80510204cb4666f6c3db7fa62e0 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-18Create a boilerplate decorator for MassPnfSim class actionsBartek Grzybowski2-18/+29
Change-Id: Ia095a608d204e3da6dae101afa04f2e66a9bceeb Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-15Run Maven directlyBartek Grzybowski1-3/+7
Maven will be run directly from MassPnfSim module, not through wrapper shell script. Change-Id: Ib2936391ace3cbd31c3b5bba4ad6d776cfb890d8 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-15Leverage internal shell runner in bootstrap modeBartek Grzybowski3-19/+13
Use native python modules for file operations Change-Id: I1ca505f9a891c722c2aace118536fa470bf50b35 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-15Add internal method for shell runner in MassPnfSim moduleBartek Grzybowski2-58/+40
Since now if module is called in 'debug' mode shell script is run with trace. Change-Id: I7bddf6c0583c4b56d4a0c3b5eeb6a78af561891f Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-15Fix ftp dir permission in sftp-server containerBartek Grzybowski3-3/+5
Container entrypoint descendant script in atmoz/sftp:alpine image is changing mount binded ftp dir owner to 'root' which makes removing it by 'clean' action not possible hence adding o+w permission for it. Change-Id: I0d9339db80c4cd8e31c4368ac63741c531a626fa Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-15Make the maven image build an independent stepBartek Grzybowski2-2/+12
This improves testability as in CI the image build is done by relevant CI runner from provided POM file so building from script is redundant. Updated doc in regard on how to build the image locally. Change-Id: I7666bc638996c855fed139ee46fcc80379a02f3b Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-12Get and kill ROP_file_creator.sh childs as wellBartek Grzybowski1-3/+15
Change-Id: I07393a0f62535563586278d2e8bc8fd6bd9380db Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-12Get the routine name to call with getattrBartek Grzybowski2-16/+3
Each subcommand has a corresponding method in MassPnfSim class hence it can be called directly by it's name. Change-Id: Id7139a5f96cceac89559bd68d89085130703f4bd Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-12Move CLI options processing to module levelBartek Grzybowski2-70/+70
Change-Id: Ie4c379480e2c641285507173387a770db63458f0 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-11Improve code testabilityBartek Grzybowski3-155/+181
A module is created with specific class methods to perform particular simulator services' lifecycle operations. Change-Id: I467360ab304a00f049bf53c3958e42f445f2d75b Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-11Allow importing the script as moduleBartek Grzybowski1-189/+196
Improves testability (TBD) Change-Id: I0c4845f85d14b49b4702270ffad537a19c1c7df7 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-11Rework input parameters handlingBartek Grzybowski3-45/+55
Main input options were turned into subcommands for improved CLI user experience. Input parameters handling and validation logic was moved out of the code to argparse native facilities. Updated the doc around script usage details. Change-Id: Ifaa2a0e49f2a0b5b677020307dc74942c422bbe1 Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-08update vCPE local casezhaoliping1231-10/+29
Issue-ID: INT-1355 Change-Id: I3172f1aacebc7f226472dac1259d35c50f520473 Signed-off-by: zhaoliping123 <zhaoliping@chinamobile.com>
2020-05-08Add missing dependency for port scanningPawel Wieczorek1-0/+7
Issue-ID: SECCOM-261 Change-Id: Id4d14cf0997310b7e039fe3f5e18ea72a4f3d71c Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-05-08Use correct nmap filtersPawel Wieczorek1-1/+11
Both closed and filtered ports should be droppped from scan results to maintain compatibility with "check_for_nonssl_endpoints.sh" script. Issue-ID: SECCOM-261 Change-Id: Ic422bebf6e46bcc42a3e5198e7702bb8b901287f Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>