Project

General

Profile

Actions

Bug #1711

closed

Fix github action error

Added by liaham over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Affected Version:
Compatible Redmine Version:

Description

There is an error when loading fixtures with postgresql on github:


Run bundle exec rake redmine:plugins:test:units
WARNING: Rails was not able to disable referential integrity.

This is most likely caused due to missing permissions.
Rails needs superuser privileges to disable referential integrity.

    cause: PG::InsufficientPrivilege: ERROR:  permission denied: "RI_ConstraintTrigger_a_17929" is a system trigger


rake aborted!
ActiveRecord::InvalidForeignKey: PG::ForeignKeyViolation: ERROR:  insert or update on table "dashboard_roles" violates foreign key constraint "fk_rails_a8da46db10"
DETAIL:  Key (role_id)=(1) is not present in table "roles".
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/plugins/redmine_dashboards/test/test_helper.rb:61:in `block in fixtures'
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/plugins/redmine_dashboards/test/test_helper.rb:60:in `each'
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/plugins/redmine_dashboards/test/test_helper.rb:60:in `fixtures'
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/plugins/redmine_dashboards/test/unit/dashboard_content_test.rb:27:in `<class:DashboardContentTest>'
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/plugins/redmine_dashboards/test/unit/dashboard_content_test.rb:26:in `<top (required)>'
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/lib/tasks/redmine.rake:182:in `block (4 levels) in <top (required)>'
/opt/hostedtoolcache/Ruby/3.1.4/x64/bin/bundle:25:in `load'
/opt/hostedtoolcache/Ruby/3.1.4/x64/bin/bundle:25:in `<main>'

Caused by:
PG::ForeignKeyViolation: ERROR:  insert or update on table "dashboard_roles" violates foreign key constraint "fk_rails_a8da46db10"
DETAIL:  Key (role_id)=(1) is not present in table "roles".
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/plugins/redmine_dashboards/test/test_helper.rb:61:in `block in fixtures'
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/plugins/redmine_dashboards/test/test_helper.rb:60:in `each'
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/plugins/redmine_dashboards/test/test_helper.rb:60:in `fixtures'
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/plugins/redmine_dashboards/test/unit/dashboard_content_test.rb:27:in `<class:DashboardContentTest>'
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/plugins/redmine_dashboards/test/unit/dashboard_content_test.rb:26:in `<top (required)>'
/home/runner/work/redmine_dashboards/redmine_dashboards/redmine/lib/tasks/redmine.rake:182:in `block (4 levels) in <top (required)>'
/opt/hostedtoolcache/Ruby/3.1.4/x64/bin/bundle:25:in `load'
/opt/hostedtoolcache/Ruby/3.1.4/x64/bin/bundle:25:in `<main>'
Tasks: TOP => redmine:plugins:test:units
(See full trace by running task with --trace)
Error: Process completed with exit code 1.
0s


Related issues 1 (0 open1 closed)

Related to Redmine Dashboards - Testing #1603: GitHub test failedClosedliaham

Actions
Actions #1

Updated by liaham over 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions #2

Updated by liaham over 1 year ago

Actions

Also available in: Atom PDF