Commit Graph

77 Commits

Author SHA1 Message Date
bcbb2d2eb6 Generate truly random email addresses in factory
Previously, it could happen under some (random) circumstances that a series of users got the same user name. This is caused by the usage of Forgery for generating a name. Forgery itself picks a random name from a list, and there is no check that two calls would indeed deliver two different names.

In order to solve the issue, we generate a truly unique email address for specs, so that the problem won't arise again.
2023-11-11 13:40:28 +01:00
411eb0b165 Specs: Use Runner factory and provide strategy class 2023-10-31 12:35:24 +01:00
a1941336d9 Fix Runner access for programming groups
* We also rename the corresponding columns in the Runner model, so that for polymorphic association gets clear.
2023-08-24 19:32:06 +02:00
e3603758ef Refactor LTI parameters and add study group
* This change also requires that submissions in our test need to have a valid study group.
2023-08-24 19:32:06 +02:00
319c3ab3b4 Add ProgrammingGroup & ProgrammingGroupMembership
* User can create programming group with other users for exercise
* Submission is shared in a group
* Also adjust specs
2023-08-24 19:32:06 +02:00
e097036296 Fix RfC Visibility to work as intended
The RfC Visibility of a consumer is intended to restrict who can access which RfCs. So far, those restrictions were only applied one way, for learners of a restricted consumer to view other (external) RfCs. However, the other way around should also work: If a RfC was created as part of a restricted consumer, no other external user should be able to interfere with this RfC. This commit, therefore, adds this direction as well and covers both directions with tests.
2023-07-13 11:02:10 +02:00
bcdc71021e Fix Rubocop offenses 2023-06-11 20:46:45 +02:00
76f592c88d Consider RfC visibility to view / change RfCs 2023-02-20 23:47:06 +01:00
9c3392b324 Add consumer-based RfC Visibility settings
This setting will be useful to increase data protection, where users might not be allowed to see RfCs from other contexts.
2023-02-20 23:47:06 +01:00
4b4942ef08 Seeds: Increase memory limit for Java 8 environment 2023-02-15 19:11:48 +01:00
637f872f34 add file_extension validation for file_type 2023-02-09 18:42:24 +01:00
2679f5fa56 Allow random selection for ProxyExercise 2023-01-20 21:02:20 +01:00
574e99eddd Fix rubocop offenses - Requires Ruby 3.1+ 2022-11-25 11:10:06 +01:00
4b00eb1e8c Allow internal users to switch their current study group 2022-09-26 16:30:54 +02:00
eb188dcd71 Add privilegedExecution flag to database and Poseidon Strategy 2022-09-24 22:32:41 +02:00
e3018c1847 Refactor consumer factory 2022-09-22 19:24:26 +02:00
936c11e31f Refactor authentication token for new study-group-based authorization 2022-09-22 19:24:26 +02:00
9c9f45ff77 Redefine user roles with their role in a study group 2022-09-22 19:24:26 +02:00
cb0f30768f Change HTTP links to HTTPS 2022-08-17 01:29:27 +02:00
4615a49e62 added strong params to comments_controller to prevent users from editing attributes which are not intended to be edited, also created specs to test this behaviour 2022-08-09 14:45:16 +02:00
1a987a65d4 added new AuthenticationToken factory, as well as new tests to check if access is denied when the token is expired, smaller optimalization changes to the user_mailer_spec and authentication_spec 2022-08-05 08:05:07 +02:00
7f47af99cb Fix order-dependent specs 2021-11-04 19:15:33 +01:00
0db6f20933 Move MemoryLimit to Execution Environment 2021-11-01 17:13:06 +01:00
06ef4430f5 Change exposed_ports to array 2021-11-01 17:13:02 +01:00
b847daf823 Remove waiting_time from runner model
After removing the logic that stores the duration that has been
waited for a runner in the runner, this now also removes the column
from the database as it is not used anymore.
2021-11-01 17:12:49 +01:00
d0d1b1bffd Introduce strategy for runner behavior
The runner model is only a class responsible for storing information
now. Based on the configuration it picks a strategy for the runner
management. The Poseidon strategy is already implemented and tested.
The Docker strategy will follow.
2021-11-01 17:12:49 +01:00
0978a3be83 Add tests for the different runner errors 2021-11-01 17:12:48 +01:00
d22d24df4d Add tests for execution environment copy to Poseidon 2021-11-01 17:12:48 +01:00
ae824565db Use older images in FactoryBot models 2021-09-11 21:29:10 +02:00
bf8d8284e2 Prevent creation of temporary users while seeding 2021-07-12 20:43:16 +02:00
da0a682ffb Apply manual rubocop fixes 2021-05-14 22:03:06 +02:00
6cbecb5b39 Apply automatic rubocop fixes 2021-05-14 22:03:06 +02:00
076812b2e7 Seeds: Fix some rubocop offenses 2021-04-07 14:06:33 +02:00
0a475f37b8 Add factory for internal user with learner role 2021-04-07 14:06:33 +02:00
58ffe061b3 Refactor exercise factories to pass user attribute to associations 2021-04-07 14:06:32 +02:00
44b32b6f6a #46 Add Prometheus exporter 2021-04-07 14:06:32 +02:00
635b9aa16f Fix RSpec/FactoryBot/FactoryClassName offenses automatically
* Fixed with `rubocop -a --only RSpec/FactoryBot/FactoryClassName`
2021-02-12 00:17:49 +01:00
028fc2989a #18 Add sql index for unpublished exercises
And remove spec for remove feature
2020-12-15 12:17:11 +01:00
46e7853465 specs for services 2019-12-09 20:35:49 +01:00
5625fa63b0 add controller specs 2019-12-06 17:25:00 +01:00
59257d17f2 Add user (ID and type) to proxy exercise
This is required for the existing policies to work
2018-12-06 00:31:45 +01:00
56c59a616e Completely remove old non-structured errors and migrate existing ones. 2018-11-30 11:27:25 +01:00
efacb5a6a9 Completely remove old hints connected to the execution environment 2018-11-28 01:21:13 +01:00
90defa8f89 Fix tests and rename request variable in specs to perform_request
Explanation: Using the variable name `request` might interfere with methods in Rails core system prevent successful test execution. See this issue: https://github.com/turbolinks/turbolinks-rails/issues/38
2018-11-06 16:49:42 +01:00
9666683bd7 Fix error, submission, hints and help views 2018-11-06 16:46:01 +01:00
de52db89f0 Upgrade Rails to version 5.2.1 and adopt code & specs where necessary
Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
2018-11-06 16:46:00 +01:00
108190c242 Create three traits in FactoryBot to prevent deprecation warning
Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
2018-11-06 16:46:00 +01:00
ff24a0bf0b Move non-empty files from test dir to spec and adopt specs
Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
2018-11-06 16:45:59 +01:00
1f12b39731 Hide FactoryBot deprecation warning by changing static assignment
Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
2018-11-06 16:45:59 +01:00
3916f66695 Fix Factories 2018-02-22 17:19:53 +01:00