Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Check CLAMP out of its repo

    Code Block
    languagebash
    git clone "https://gerrit.onap.org/r/clamp"


  2. Change into the "clamp" directory
  3. Build CLAMP

    Code Block
    languagebash
    mvn clean install

      You may get the following error (See

    Jira Legacy
    serverONAP JIRASystem Jira
    serverId425b2b0a4733707d-557c2057-3c0c3a0f-b515ae5e-579789cceedb4fd8aff50176
    keyCLAMP-944
    )

    Code Block
    languagebash
    [ERROR] DOCKER> I/O Error [[docker.io/python:2-slim] "python": Timeout after 120088 ms while waiting on tcp port '[/172.17.0.3:8080]']

    If so, then run the following command to skip integration tests

    Code Block
    languagebash
    mvn clean install -DskipITs


...

  1. Open a console and go into the directory extra/bin-for-dev

    Code Block
    languagebash
    cd extra/bin-for-dev


  2. Start an instance of the CLAMP MaraDB database in Docker using the helper script. This script uses docker-compose to bring up an instance of the CLAMP MariaDB.

    Code Block
    languagebash
    ./start-db.sh


  3. Start an instance of the CLAMP endpoint emulator in Docker using the helper script. This script uses docker-compose to bring up an instance of the CLAMP endpoint emulator.

    Code Block
    languagebash
    ./start-emulator.sh


  4. Check that the database and emulator are running

    Code Block
    languagebash
    docker ps

    You should see the two images running

    Code Block
    languagebash
    CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                    NAMES
    93cffd7e7d2e        python:2-slim       "/bin/sh -c 'pip ins…"   7 seconds ago        Up 7 seconds        0.0.0.0:8085->8085/tcp   clamp_third-party-proxy_1
    0b26d68f4048        mariadb:10.5.4      "docker-entrypoint.s…"   About a minute ago   Up About a minute   0.0.0.0:3306->3306/tcp   clamp_db_1
    
    


  5. In the file src/test/resources/application.properties, run this sed command or make the changes below in a text editor:

    Change all occurrences of the string "

    Code Block
    languagebash
    sed -e 's/${clamp\.it\.tests\.http}
    " to "8080"Change all occurrences of the string "
    /8080/g' -e 's/${docker\.http-cache\.port\.host}
    " to "8085"Change all occurrences of the string "
    /8085/g' -e 's/${docker\.mariadb\.port\.host}
    " to "3306"In the file
    /3306/g' -i src/test/resources/
    https/https-test
    application.properties
    :


    1. Change all occurrences of the string "${clamp.it.tests.httpshttp}" to "8090" (Any free port value)Change all 8080"
    2. Change all occurrences of the string "${clampdocker.ithttp-cache.testsport.http-redirectedhost}" to "80808085"
    3. Change all occurrences of the string "${docker.mariadb.port.host}" to "3306"
     In
  6. In the file src/test/resources/

    robotframework

    https/

    robotframework

    https-test.properties, run this sed command or make the changes below in a text editor,

    Code Block
    languagebash
    sed -e 's/${clamp\.it\.tests\.https}/8090/g' -e 's/${clamp\.it\.tests\.http-redirected}/8080/g' -e 's/${docker\.mariadb\.port\.host}/3306/g' -i src/test/resources/https/https-test.properties


    1. Change all occurrences of the string "${clamp.it.tests.https}" to "8090" (Any free port value)
    2. Change all occurrences of the string "${clamp.it.tests.http-redirected}" to "8080"
    3. Change all occurrences of the string "${docker.mariadb.port.host}" to "3306"
  7.  In the file src/test/resources/robotframework/robotframework-test.properties, run this sed command or make the changes below in a text editor:

    Code Block
    languagebash
    sed -e 's/${clamp\.it\.tests\.robotframework\.http}/8080/g' -e 's/${docker\.http-cache\.port\.host}/8085/g' -e 's/${docker\.mariadb\.port\.host}/3306/g' -i src/test/resources/robotframework/robotframework-test.properties


    1. Change all occurrences of the string "${clamp.it.tests.robotframework.http}" to "8080" (Any free port value)
    2. Change all occurrences of the string "${docker.http-cache.port.host}" to "8085"
    3. Change all occurrences of the string "${docker.mariadb.port.host}" to "3306"