Skip to content

Commit

Permalink
Release v1.0 (#189)
Browse files Browse the repository at this point in the history
* retarget chaincode to default/latest

* Update CHANGELOG.md

* retry executeTransaction on failure

* add default inputs for timeout parameters

* refactor retry

* codestyle

* fix operation tests

* update tests to always have user be SYSTEM and ADMIN

* Revert "fix operation tests"

This reverts commit 99329f3.

* only test basic stuff in  DevNetwork, since everything needs approves and enrolls now

* target chaincode to prerelease

* fix admission tests

* update tests

* fix tests

Co-authored-by: Matthias Geuchen <mgeuchen@mail.uni-paderborn.de>
Co-authored-by: Anemone Kampkötter <anemone@kampkoetter.de>

* code style

* fix usermanagement tests

* test new chaincode

* fix usermanagement test

* update version tests

* try fix testBase (registering test-admin as system)

* target chaincode

* code style

* fix usermanagement test

* fix admission tests

* fix admission tests

* retarget chaincode to latest release

* fix break in try problem

* optimize imports

* Update src/main/scala/de/upb/cs/uc4/hyperledger/utilities/helper/ReflectionHelper.scala

Co-authored-by: dhelmert <52128028+dhelmert@users.noreply.github.com>

* Update CHANGELOG.md

* Fix gson not converting List[String] to string array json

* Use non-deprecated conversion

* Update changelog

* Fix tests for changed access rights

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>
Co-authored-by: Anemone Kampkötter <anemone@kampkoetter.de>

* fix tests

* code style

* Update CHANGELOG.md

* Update sbt to 1.4.7

* fix operation 1.1 timeouts

Co-authored-by: Daniel Helmert <dhelmert@mail.uni-paderborn.de>
Co-authored-by: Robin Helmert <rhelmert@mail.uni-paderborn.de>

* fix compile err

Co-authored-by: Daniel Helmert <dhelmert@mail.uni-paderborn.de>
Co-authored-by: Robin Helmert <rhelmert@mail.uni-paderborn.de>

* add ExamConnection

* fix Exam Trait documentation

* Add ExamResult Connection

* adjust admissions contract to provide new methods (stil support old getAdmissions)

* fix compile err

* code style

* Update src/main/scala/de/upb/cs/uc4/hyperledger/connections/traits/ConnectionExamResultTrait.scala

Co-authored-by: dhelmert <52128028+dhelmert@users.noreply.github.com>

* Update CHANGELOG.md

* fix operation 1.1 timeouts

Co-authored-by: Daniel Helmert <dhelmert@mail.uni-paderborn.de>
Co-authored-by: Robin Helmert <rhelmert@mail.uni-paderborn.de>

* fix compile err

Co-authored-by: Daniel Helmert <dhelmert@mail.uni-paderborn.de>
Co-authored-by: Robin Helmert <rhelmert@mail.uni-paderborn.de>

* Update CHANGELOG.md

* update evaluate/submit handling

* codestyle

* compile err

* compile err

* compile err

* code style

* Update CHANGELOG.md

* target chaincode to pre-release

* first exam tests

* code style

* further tests for exam

* execute exam Tests

* fix admission tests

* code style

* clean

* sl4j test

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* fix admission tests

* fix exam same names

* portential fix StaticLoggerBinder class not found

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* fix duplicate test names

* add draft for encoder and change loglevel to Error

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* change do logback

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* change to logback classic

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* test with logger off

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* add logback-test

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* refactor logger

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* codeformat

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* add secondary logback to track down bug

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* fix bug

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* manual scalariform

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* update changelog

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* Update build.sbt

Co-authored-by: helro <rhelmert@mail.upb.de>

* Update project/Dependencies.scala

Co-authored-by: helro <rhelmert@mail.upb.de>

* Update project/Dependencies.scala

Co-authored-by: helro <rhelmert@mail.upb.de>

* Update src/main/scala/de/upb/cs/uc4/hyperledger/utilities/helper/Logger.scala

Co-authored-by: helro <rhelmert@mail.upb.de>

* Update src/main/scala/de/upb/cs/uc4/hyperledger/utilities/helper/Logger.scala

Co-authored-by: helro <rhelmert@mail.upb.de>

* codeformat 2nd

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* codeformat 3rd

Co-authored-by: Niko Bergemann <niko.bergemann@web.de>

* additional examTests(deny)

* fix codestyle

* fix examTests

* update tests

* Update slf4j-api to 1.7.30

* replace Lists by Sequences

* Update CHANGELOG.md

* update tests

* update getExams tests

* code style

* update tests to check expected error

* fix tests

* fix exam tests

* refactor tests

* retarget chaincode to new pre-release

* deprecate old getAdmissions calls

* Add ExamAdmission tests

* add ExamAdmission tests to execution

* fix TestDataAdmission

* not use deprecated methods

* fix duplicate test names

* retarget chaincode to 103

* fix some expected error messages

* fix exam tests

* fix old admissions

* fix examId position in new admission

* clean up

* fix exam tests

* fix admission tests

* fix exam messages

* fix tests

* fix tests

* test fix

* fix exam admission tests

* code style

* Update README.md

update readme

* execute transaction fix

* Update CHANGELOG.md

* test new release

* retarget to new version of prerelease

* fix exam tests

* fix exam tests

* target chaincode

* retarget chaincode => 0.17.107

* adjust exam tests to new time-format

* adjust tests to new eror msg

* fix some test errors

* target caincode => v0.18.101

* adjust tests to admissions not comparing timestamps

* update test helper

* fix admission tests

* fix exam admission tests

* target chaincode v0.18.102

* fix an admission test

* fix an admission test

* fix some exam tests

* fix greedy regex matcher

* fix some exam test errors

* fix exam test

* fix codestyle

* fix examTests

* fix admisssionTests_Exams setup method

* codestyle

* admission tests _ Exams :: fix setup

* target chaincode to v0.18.103

* fix admission exam tests

* fix exams tests

* retarget chaincode to v0.18.104

* codestyle fix

* fix chaincode targe

* fix exam tests

* fix admission tests exams

* set up different examRegs for test

* code style

* fix examAdmission setup

* fix compile error

* fix admission test setup

* code style

* Update scalatest to 3.2.4

* fix testAdmissions_Exam setup

* fix compile err

* fix compile err 2

* fix tests

* update test expected errors

* Update scalatest to 3.2.5

* update chaincode target

* update workflows to ignore all markdown files

* - first draft at structure description
- refactor documents

* ignore images in workflows

* retarget chaincode to develop (release v0.18.1)

* fix some tests

* provide examResult TEstData

* add examResult support to testBase

* add utility to compare/test examResults

* first draft at examResult test

* add examResult tests to execution

* only perform examResultTests for test purpose

* update UserHandling in tests

* update UserHandling in tests

* Revert "update UserHandling in tests"

This reverts commit c48699e.

* fix examResultTest call

* codestyle

* codestyle

* fix examResult Test Setup

* fix examResult test setup

* fix prepare usersd ethod

* fix examTimeHandling in tests

* reenable all tests

* Update scalatest to 3.2.6

* Update sbt to 1.4.9

* fix exam tests

* Update README.md

update and remove dev-network

* fail pipeline

* update test sbt action ref

* fix coverage minimum definition

* test new coverage thresholds

* fix double cast

* set unspecified coverage to 100 to set unreachable

* Update production_network_test.yml

* Update production_network_test.yml

* clean up tests / improve coverage?

* code style

* fix tests

* fix tests

* fix tests

* Update CHANGELOG.md

Co-authored-by: Matthias Geuchen <mgeuchen@mail.uni-paderborn.de>
Co-authored-by: Anemone Kampkötter <anemone@kampkoetter.de>
Co-authored-by: dhelmert <52128028+dhelmert@users.noreply.github.com>
Co-authored-by: Matthias Geuchen <mgeuchen@mail.upb.de>
Co-authored-by: matthias-geuchen <63234249+matthias-geuchen@users.noreply.github.com>
Co-authored-by: Scala Steward <me@scala-steward.org>
Co-authored-by: Daniel Helmert <dhelmert@mail.uni-paderborn.de>
Co-authored-by: Robin Helmert <rhelmert@mail.uni-paderborn.de>
Co-authored-by: Robin Helmert <rhelmert@mail.upb.de>
  • Loading branch information
10 people authored Mar 15, 2021
1 parent f9e07c2 commit 84b33bf
Show file tree
Hide file tree
Showing 110 changed files with 6,185 additions and 1,589 deletions.
4 changes: 2 additions & 2 deletions .github/actions/dev_network_setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
chaincode_branch:
description: 'branch of the chaincode repo you want to checkout.'
required: true
default: 'develop'
default: ''

runs:
using: "composite"
Expand All @@ -28,7 +28,7 @@ runs:
echo "##########################"
echo "# begin sleep #"
echo "##########################"
sleep 180
sleep 100
echo "# finish sleep #"
echo "##########################"
popd
Expand Down
36 changes: 21 additions & 15 deletions .github/actions/production_network_setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,36 @@ inputs:
description: 'path to the network where we can find the startNetwork.sh and installChaincode.sh scripts.'
required: true
default: 'hlf-network'
chaincode_branch:
description: 'branch of the chaincode repo you want to checkout.'
required: true
default: ''

runs:
using: "composite"

steps:
steps:
# start network
- name: Start Network
run: |
pushd ${{ inputs.network_folder }}
echo "##########################"
echo "# start network script #"
echo "##########################"
./startNetwork.sh
echo "##########################"
echo "# started network script #"
echo "# start deploy script #"
echo "##########################"
popd
shell:
bash

- name: Install Chaincode
run: |
pushd ${{ inputs.network_folder }}
./installChaincode.sh
echo "ChaincodeBranch=${{ inputs.chaincode_branch }}"
if [[ ${{ inputs.chaincode_branch }} == "" ]]
then
./deploy.sh -t
else
./deploy.sh -b ${{ inputs.chaincode_branch }} -t
fi
export NODE_IP=$(source ./scripts/util.sh && get_worker_ip)
# set env var for subsequent actions
echo "UC4_KIND_NODE_IP=$NODE_IP" >> $GITHUB_ENV
#echo "::set-env name=UC4_KIND_NODE_IP::$NODE_IP"
#echo "NODE_IP=$NODE_IP"
#echo "UC4_KIND_NODE_IP=$UC4_KIND_NODE_IP"
popd
shell:
bash
bash
50 changes: 33 additions & 17 deletions .github/workflows/dev_network_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,61 @@ on:
workflow_dispatch:
inputs:
chaincode_target:
description: 'Chaincode Target Branch'
description: 'Chaincode Target Version (empty = latest Release)'
required: true
default: 'develop'
default: ''
test_set:
description: 'Define which tests to run'
required: true
default: "*ManagerTests *CourseAccessTests *CourseErrorTests *MatriculationErrorTests *MatriculationAccessTests"
default: "*HelperTests *InternalManagerTests *VersionAccessTests"
# on push event
push:
# except for these files
paths-ignore:
- README.md
- '**.md'
- '**.JPG'
- LICENSE
- CHANGELOG.md
- .github/workflows/production_network_test.yml
- .github/workflows/no_network_test.yml
- .github/workflows/style_check.yaml
- .github/workflows/publish_to_sonatype.yaml
- .github/actions/production_network_setup/action.yml
# on pull request to protected branches
pull_request:
branches:
- develop
- master
- main
# except for these files
paths-ignore:
- '**.md'
- '**.JPG'
- LICENSE
- .github/workflows/production_network_test.yml
- .github/workflows/no_network_test.yml
- .github/workflows/style_check.yaml
- .github/workflows/publish_to_sonatype.yaml
- .github/actions/production_network_setup/action.yml

jobs:

DeployAndTestDevNetwork:
env:
TEST_SET: "*ManagerTests *CourseAccessTests *CourseErrorTests *MatriculationErrorTests *MatriculationAccessTests"
CHAINCODE_TARGET: "develop"
TEST_SET: "*HelperTests *InternalManagerTests *VersionAccessTests"
CHAINCODE_TARGET: ""

runs-on: ubuntu-latest

steps:
# ################### ENV VARS ############################################################ #
# Rewrite chaincodeTarget if started manually
- name: rewrite chaincodeTarget if manual invocation
if: github.event.inputs.chaincode_target != ''
run: echo "::set-env name=CHAINCODE_TARGET::${{ github.event.inputs.chaincode_target }}"

# Rewrite test_Set if started manually
- name: rewrite test_set if manual invocation
if: github.event.inputs.test_set != ''
run: echo "::set-env name=TEST_SET::${{ github.event.inputs.test_set }}"
run: echo "TEST_SET=${{ github.event.inputs.test_set }}" >> $GITHUB_ENV

# Rewrite chaincodeTarget if started manually
- name: rewrite chaincodeTarget if manual invocation
if: github.event.inputs.chaincode_target != ''
run: echo "CHAINCODE_TARGET=${{ github.event.inputs.chaincode_target }}" >> $GITHUB_ENV
# ################### ENV VARS ############################################################ #

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down Expand Up @@ -82,9 +95,12 @@ jobs:
# ################### TEST WITH REPORTS ############# #
# Run Tests
- name: run tests with coverage and reports
uses: NikoBergemann/action-sbt-test-report@v2
uses: NikoBergemann/action-sbt-test-report@v3
with:
what-to-test: $TEST_SET
env:
UC4_TESTBASE_TARGET: 'DEV_NETWORK'
COVERAGE_MINIMUM: '8'

# Combine reports
- name: Scalatest multiproject HTML merger
Expand All @@ -101,10 +117,10 @@ jobs:
name: test-reports
path: target/test_reports/

# Uplaod Coverage Report
# Upload Coverage Report
- name: Upload coverage report
uses: actions/upload-artifact@v1
with:
name: code-coverage
path: target/scala-2.13/scoverage-report
path: target/scoverage-report
# ################### TEST WITH REPORTS ############# #
99 changes: 99 additions & 0 deletions .github/workflows/no_network_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Hyperledger_Scala_With_No_Network

on:
# daily at 00:00
schedule:
- cron: '0 0 * * *'
# manual triggers with parameters
workflow_dispatch:
inputs:
test_set:
description: 'Define which tests to run'
required: true
default: "*HelperTests *NonExistentNetworkTests"
# on push event
push:
# except for these files
paths-ignore:
- '**.md'
- '**.JPG'
- LICENSE
- .github/workflows/production_network_test.yml
- .github/workflows/dev_network_test.yml
- .github/workflows/style_check.yaml
- .github/workflows/publish_to_sonatype.yaml
- '.github/actions/**'
# on pull request to protected branches
pull_request:
branches:
- develop
- main
# except for these files
paths-ignore:
- '**.md'
- '**.JPG'
- LICENSE
- .github/workflows/production_network_test.yml
- .github/workflows/dev_network_test.yml
- .github/workflows/style_check.yaml
- .github/workflows/publish_to_sonatype.yaml
- '.github/actions/**'

jobs:

DeployAndTestNoNetwork:
env:
TEST_SET: "*HelperTests *NonExistentNetworkTests"

runs-on: ubuntu-latest

steps:
# ################### ENV VARS ############################################################ #
# Rewrite test_Set if started manually
- name: rewrite test_set if manual invocation
if: github.event.inputs.test_set != ''
run: echo "TEST_SET=${{ github.event.inputs.test_set }}" >> $GITHUB_ENV
# ################### ENV VARS ############################################################ #

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: check out source repository
uses: actions/checkout@v2

# Set up JDK
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

# ################### TEST WITH REPORTS ############# #
# Run Tests
- name: run tests with coverage and reports
uses: NikoBergemann/action-sbt-test-report@v3
with:
what-to-test: $TEST_SET
env:
UC4_TESTBASE_TARGET: 'not relevant'
COVERAGE_MINIMUM: '15'

# Combine reports
- name: Scalatest multiproject HTML merger
uses: bastihav/scalatest-multiproject-html-action@v1
if: always()
with:
path: target/test_reports/

# Upload Test Report
- name: Upload test report
uses: actions/upload-artifact@v1
if: always()
with:
name: test-reports
path: target/test_reports/

# Upload Coverage Report
- name: Upload coverage report
uses: actions/upload-artifact@v1
with:
name: code-coverage
path: target/scoverage-report
# ################### TEST WITH REPORTS ############# #
Loading

0 comments on commit 84b33bf

Please sign in to comment.