mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
Merge pull request #248 from csaf-poc/itest-download-from-agg
Improve integration test scripts
This commit is contained in:
commit
1b0e5b4238
3 changed files with 38 additions and 5 deletions
|
|
@ -113,6 +113,8 @@ popd
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
# Wait for the service to be started
|
# Wait for the service to be started
|
||||||
|
echo
|
||||||
|
echo === Try to reach the validator service ten times, up to nine fails are ok
|
||||||
for ((i = 1; i <= 10; i++)); do
|
for ((i = 1; i <= 10; i++)); do
|
||||||
if [ $(curl -IL http://localhost:3000/api/v1/tests | grep -c HTTP ) != "0" ]; then
|
if [ $(curl -IL http://localhost:3000/api/v1/tests | grep -c HTTP ) != "0" ]; then
|
||||||
break
|
break
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,20 @@ sudo mkdir /var/csaf_aggregator
|
||||||
sudo chgrp www-data /var/csaf_aggregator
|
sudo chgrp www-data /var/csaf_aggregator
|
||||||
sudo chmod g+ws /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/
|
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
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,32 @@
|
||||||
|
|
||||||
set -e # to exit if a command in the script fails
|
set -e # to exit if a command in the script fails
|
||||||
|
|
||||||
echo
|
|
||||||
echo '==== run downloader'
|
|
||||||
cd ~/csaf_distribution
|
cd ~/csaf_distribution
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo '==== run downloader (1)'
|
||||||
|
|
||||||
mkdir ~/downloaded1
|
mkdir ~/downloaded1
|
||||||
|
|
||||||
./bin-linux-amd64/csaf_downloader --directory ../downloaded1 \
|
./bin-linux-amd64/csaf_downloader --directory ../downloaded1 \
|
||||||
--rate 4.1 --verbose --insecure localhost
|
--rate 4.1 --verbose --insecure localhost
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo '==== this was downloaded'
|
echo '==== this was downloaded (1)'
|
||||||
cd ~/downloaded1
|
pushd ~/downloaded1
|
||||||
find .
|
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-metadata.json
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo '==== this was downloaded (2)'
|
||||||
|
pushd ~/downloaded2
|
||||||
|
find .
|
||||||
|
popd
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue