1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00
gocsaf/docs/scripts
Bernhard Reiter 490fe4a589
Fix integration tests setup script
* Change from calling the web interface to create the folders to
   using the `/api/create` so it works even if the web interface is
   turned off.
2022-07-26 11:14:40 +02:00
..
createCCForITest.sh Improve nginx example config 2022-04-12 16:05:45 +02:00
createRootCAForITest.sh Add scripts for integration test setup and docs generation 2022-04-08 10:04:34 +02:00
createWebserverCertForITest.sh Add dns config example and add it to integration tests 2022-05-16 15:20:37 +02:00
DNSConfigForItest.sh Add dns config example and add it to integration tests 2022-05-16 15:20:37 +02:00
downloadExamples.sh Add scripts for integration test setup and docs generation 2022-04-08 10:04:34 +02:00
prepareUbuntuInstanceForITests.sh Improve scripts/prepareUbuntuInstanceForITests.sh 2022-04-21 16:39:56 +02:00
Readme.md Improve doc for development test script setup 2022-07-21 12:44:03 +02:00
setupProviderForITest.sh Fix integration tests setup script 2022-07-26 11:14:40 +02:00
setupValidationService.sh Move example location of config files to /etc 2022-07-21 15:04:09 +02:00
testAggregator.sh Improve integration test scripts 2022-07-21 16:16:16 +02:00
testChecker.sh Improve integration test for checker 2022-06-14 11:56:11 +02:00
testDownloader.sh Fix testDownloader url 2022-07-21 16:25:12 +02:00
TLSClientConfigsForITest.sh Add docs for a provider proxy (#255) 2022-07-25 15:23:11 +02:00
TLSConfigsForITest.sh Add dns config example and add it to integration tests 2022-05-16 15:20:37 +02:00
uploadToProvider.sh Improve integration test uploadToProvider.sh 2022-04-13 17:46:10 +02:00

Scripts for assisting the Integration tests. They are written on Ubuntu 20.04 TLS amd64.

  • prepareUbunutForITest.sh installs the required packages for the csaf_distribution integration tests on a naked ubuntu 20.04 LTS amd64.

  • TLSConfigsForITest.sh generates a root CA and webserver cert by running createRootCAForITest.sh and createWebserverCertForITest.sh and configures nginx for serving TLS connections.

  • TLSClientConfigsForITest.sh generates client certificates by calling createCCForITest.sh which uses the root certificate initialized before with createRootCAForITest.sh. It configures nginx to enable the authentication with client certificate. (This assumes that the same folder name is used to create the root certificate)

  • setupProviderForITest.sh builds the csaf_provider, writes the required nginx configurations and create the initial folders. IT calls uploadToProvider.sh to upload some csaf example files to the provider.

As creating the folders needs to authenticate with the csaf_provider, the configurations of TLS server and Client certificate authentication should be set. So it is recommended to call the scripts in this order: TLSConfigsForITest.sh, TLSClientConfigsForITest.sh, setupProviderForITest.sh

Calling example (as root):

    curl --fail -O https://raw.githubusercontent.com/csaf-poc/csaf_distribution/main/docs/scripts/prepareUbuntuInstanceForITests.sh
    bash prepareUbuntuInstanceForITests.sh

    git clone https://github.com/csaf-poc/csaf_distribution.git # --branch <name>
    pushd csaf_distribution/docs/scripts/

    export FOLDERNAME=devca1 ORGANAME="CSAF Tools Development (internal)"
    source ./TLSConfigsForITest.sh
    set +e  # for an interactive shell, reverse set -e done by previous line
    ./TLSClientConfigsForITest.sh
    ./setupProviderForITest.sh
    ./testAggregator.sh
    ./testDownloader.sh