1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Improve integration test scripts

* Add a simple aggegator web server config.
  * Add a downloader test using a direct url from the aggregator.
This commit is contained in:
Bernhard Reiter 2022-07-21 16:16:16 +02:00
parent 5716374eac
commit 88a2d585be
No known key found for this signature in database
GPG key ID: 2B7BA3BF9BC3A554
2 changed files with 36 additions and 5 deletions

View file

@ -15,5 +15,20 @@ sudo mkdir /var/csaf_aggregator
sudo chgrp www-data /var/csaf_aggregator
sudo chmod g+ws /var/csaf_aggregator
echo
echo '=== setup nginx to serve aggregator directory on 9443'
pushd /etc/nginx/sites-enabled
sudo cp default default2
sudo sed -i -e 's/8443/9443/' -e 's/\(listen []:[]*443\)/#\1/' \
-e 's|root /var/www/html;|root /var/csaf_aggregator/html;|' \
default2
sudo systemctl reload nginx
popd
echo
echo '=== run aggregator'
cd ~/csaf_distribution/
sudo ./bin-linux-amd64/csaf_aggregator -c docs/examples/aggregator.toml
sudo cp docs/examples/aggregator.toml /etc/csaf
sudo ./bin-linux-amd64/csaf_aggregator -c /etc/csaf/aggregator.toml

View file

@ -10,16 +10,32 @@
set -e # to exit if a command in the script fails
echo
echo '==== run downloader'
cd ~/csaf_distribution
echo
echo '==== run downloader (1)'
mkdir ~/downloaded1
./bin-linux-amd64/csaf_downloader --directory ../downloaded1 \
--rate 4.1 --verbose --insecure localhost
echo
echo '==== this was downloaded'
cd ~/downloaded1
echo '==== this was downloaded (1)'
pushd ~/downloaded1
find .
popd
echo
echo '==== run downloader (2)'
mkdir ~/downloaded2
./bin-linux-amd64/csaf_downloader --directory ../downloaded2 \
--verbose --insecure https://localhost:9443/.well-known/csaf-aggregator/local-dev-provider2/provider-metatdata.json
echo
echo '==== this was downloaded (2)'
pushd ~/downloaded2
find .
popd