7631e2a9b5
pass boolean clear argument to DBInit()
2021-10-19 14:40:45 +02:00
515ef2de15
fix CI tests
2021-10-19 14:18:23 +02:00
2a9b2d4026
fix linting errors found by staticcheck
2021-10-19 13:56:53 +02:00
Sonja Happ
7b30b46b27
Add feature for duplicating scenario on external login
2021-09-17 20:32:36 +02:00
Sonja Happ
6b2677ef63
fix syntax errors in tests
2021-04-29 13:28:01 +02:00
fab5fbf66a
fix user tests
2021-02-08 11:56:14 +01:00
e4d200e6fd
remove basePath and basePath settings
2021-02-08 11:56:11 +01:00
f4c662940e
Authentication: remove unused argument
2021-02-08 11:55:36 +01:00
Sonja Happ
616a1c74dc
WIP: adding test data via JSON file #44
2021-01-26 15:44:51 +01:00
2625e16fbe
config: fix typo GolbalConfig -> GlobalConfig
2021-01-25 10:57:25 +01:00
fee9e3aa6d
allow passing token via URL query parameter ( closes #49 )
2020-11-23 17:29:50 +01:00
Sonja Happ
1de4d9c9c2
Code base refactoring: no functional changes, improving test coverage
2020-03-27 11:53:26 +01:00
Sonja Happ
70b2ded851
modularize main function, use DBpool instead of local DB in database package and all testing functions
2020-03-19 10:50:18 +01:00
Sonja Happ
92f22035c6
add GPL 3.0 license statement in all (not auto-generated) code files
2019-11-20 11:08:33 +01:00
Sonja Happ
6d4c84ec4e
- InitDB returns error
...
- Check more errors in InitDB
- fix for healthz endpoint (error checking was wrong)
- remove dbinit parameter from config due to redundancy with mode parameter
2019-11-14 11:44:26 +01:00
Sonja Happ
7a64d4653a
Some fixes with respect to config
...
- resolve some name overlappings
- InitConfig sets global config and returns error
- Add missing error handling
2019-11-14 10:38:51 +01:00
d546f7bc91
fix tests
2019-11-13 21:22:17 +01:00
Sonja Happ
7963ce5e78
remove DB_TEST and use DB_NAME instead, InitDB function now has parameter to specify if DB is used for testing or not
2019-11-11 12:06:53 +01:00
2311d643c6
fix repo path
2019-11-09 11:40:56 +01:00
Sonja Happ
df910c56f7
admin password required to change user's password as admin, fixes #24
2019-11-05 12:05:39 +01:00
Sonja Happ
bae3bc9046
user: admin user can change password of any user without knowing old password
2019-10-24 12:44:26 +02:00
Sonja Happ
2852c4897f
user: adapt testing to new password update procedure
2019-10-24 12:26:25 +02:00
Sonja Happ
56eabdc194
change active flag in update user to string instead of bool
2019-09-17 17:19:21 +02:00
Sonja Happ
14972262c0
add "Active" bool property to user model, required modifications in user and scenario packages
2019-09-17 17:00:07 +02:00
Sonja Happ
b570956baf
improve user package
...
- testing more error return codes
- remove some errors from code
- remove unnecessary code
- require a username of at least 3 letters/digits
2019-09-12 10:18:42 +02:00
Sonja Happ
ed1d7677f2
add testing of authentication endpoint, revise authentication endpoint
2019-09-11 17:09:36 +02:00
Sonja Happ
387c922059
Revision of (file) testing
...
- create a guest user and modify function that adds users to the DB for testing
- improve code coverage of file endpoint tests and remove some obsolete code from file package
- add more error info if role validation fails in all endpoints
- change response of GET files to only return the file data and nothing else
- fix some bugs in file endpoints that became visible by the tests
2019-09-11 12:30:01 +02:00
Sonja Happ
f3a7ed0e61
**Major revision of repository structure**
...
- rename common package to database
- move all code not related to database to new helper package
- add more test in database package to improve code coverage
- add a new (own) package for AMQP client
2019-09-10 16:28:57 +02:00
Sonja Happ
2ffda7cad8
- revise naming of some common functions
...
- improve returning of error codes by using common functions
- use a separate file for authentication endpoint to improve clarity of code
2019-09-09 15:30:17 +02:00
Sonja Happ
ac9e564bc8
- deleting old obsolete test functions
...
- move all data and functions solely used for testing to the file test_utilities
- get rid of utilities file
2019-09-09 12:11:55 +02:00
Sonja Happ
16b3499126
get rid of Request struct as is caused more trouble than good
2019-09-05 09:11:56 +02:00
Sonja Happ
0d389e9cd5
start each user test function with an empty DB containing only the admin user
2019-09-04 09:05:19 +02:00
smavros
5ac7b5b348
Adds test for user's not allowed actions
2019-08-30 18:19:10 +02:00
smavros
67e4043071
Extends test for GET /users auth as role=User
2019-08-30 15:59:59 +02:00
smavros
9e01b54307
Improves TestAddUser by testing also GET method
2019-08-25 21:24:55 +02:00
smavros
6959e65bce
Adds test for deleting user
2019-08-25 21:03:49 +02:00
smavros
2c087e80e7
Adds test for invalid user update
2019-08-25 20:55:44 +02:00
smavros
4d79f06aba
Renaming - Uses only one modRequest variable in user test
2019-08-25 20:02:35 +02:00
smavros
5c820982e4
Adds test for user who modifies his credentials
2019-08-25 19:58:56 +02:00
smavros
c00d0e0422
Uses GetResponseID() instead of LengthOfResponse() in user test
2019-08-25 17:05:00 +02:00
smavros
e0746f112f
Minor changes in modify user test
2019-08-23 13:05:31 +02:00
smavros
0e0936a736
Adds test for user endpoint:
...
- For getting all the users
- For modifying a user as Admin
- For adding a user
2019-08-19 11:44:08 +02:00
smavros
94ea3c4ebf
Breaks user test into different testing functions
2019-08-15 18:16:30 +02:00
smavros
c2429394ed
Renames VisitorAuthenticate() to RegisterAuthenticate()
2019-08-15 14:52:19 +02:00
smavros
426b834ea5
Modifies tests for accepting {"id":$userID}
response
2019-08-15 14:37:13 +02:00
smavros
1e4a2ee7cb
Adds test for PUT /user/$ID endpoint
2019-08-15 00:36:46 +02:00
smavros
86870e3075
Adds test for POST /user
2019-08-13 19:30:21 +02:00
smavros
59a37bf601
Removes Credentials type from common/models.go:
...
Every test will fail except from the user's package since it is the
only one using the new Request type.
2019-08-13 19:21:39 +02:00
smavros
b6a269bdeb
Deprecates ResponseMsgUses. Introduces common/requests.go
2019-08-13 17:41:04 +02:00
smavros
ae2737571f
Adds test for GET /user/:ID
2019-08-13 16:56:10 +02:00