Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #19 from mrvahedi68/mrv/test-suite
Browse files Browse the repository at this point in the history
[WIP] Adding solid test suite to GitHub actions
  • Loading branch information
michielbdejong authored Sep 2, 2023
2 parents b770739 + 08c4278 commit 97ae809
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: npm install && npm run build
command: npm run start


59 changes: 59 additions & 0 deletions test/surface/run-solid-test-suite.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash
set -e

export SKIP_CONC=1

function setup {
npm ci
npm start -- --detectOpenHandles &> '/dev/null' &
git clone https://github.com/solid-contrib/solid-crud-tests.git
cd solid-crud-tests
git checkout v6.0.0
npm ci
cd ..
git clone https://github.com/solid-contrib/web-access-control-tests.git
cd web-access-control-tests
#git fetch origin
#git checkout run-against-css
git pull
npm ci
rm run-against-css.sh
cp ../test/surface/web-access-control-tests.sh run-against-css.sh
chmod +x run-against-css.sh
cd ..
}

function runThirdParty {
npm start -- --port 3001 --detectOpenHandles &
}

function waitForCss {
until curl -kI http://localhost:$1 2> /dev/null
do
echo Waiting for CSS to start on port $1, this can take up to a minute ...
sleep 1
done
}

function teardown {
kill $(lsof -t -i :3000)
kill $(lsof -t -i :3001)
rm -rf solid-crud-tests web-access-control-tests
}

function runTests {
cd $1
./run-against-css.sh
cd ..
}

# ...
teardown || true
setup
waitForCss 3000
runTests solid-crud-tests
# runThirdParty
# waitForCss 3001
# runTests web-access-control-tests
teardown

15 changes: 15 additions & 0 deletions test/surface/web-access-control-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e

export WEBID_ALICE=http://localhost:3000/profile/card#me
export OIDC_ISSUER_ALICE=http://localhost:3000
export STORAGE_ROOT_ALICE=http://localhost:3000/
export WEBID_BOB=http://localhost:30001/profile/card#me
export OIDC_ISSUER_BOB=http://localhost:30001
export STORAGE_ROOT_BOB=http://localhost:30001/


# npm run jest "$@"
# DEBUG=*
export INCLUDE_MAY=1
npm run jest

0 comments on commit 97ae809

Please sign in to comment.