From 24140bd3f5a4d5a64619f66ff08a75b2c368520e Mon Sep 17 00:00:00 2001 From: Michael Reimsbach Date: Mon, 15 Jul 2024 14:11:50 +0200 Subject: [PATCH] fix(tests): reduce number of relationships in fixtures --- internal/database/mariadb/test/fixture.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/database/mariadb/test/fixture.go b/internal/database/mariadb/test/fixture.go index cd0f7b29..f86df6cd 100644 --- a/internal/database/mariadb/test/fixture.go +++ b/internal/database/mariadb/test/fixture.go @@ -329,16 +329,16 @@ func (s *DatabaseSeeder) SeedDbWithNFakeData(n int) *SeedCollection { issueVariants := s.SeedIssueVariants(n, repos, issues) users := s.SeedUsers(n) owners := s.SeedOwners(n, services, users) - supportGroupServices := s.SeedSupportGroupServices(n, services, supportGroups) - supportGroupUsers := s.SeedSupportGroupUsers(n, users, supportGroups) + supportGroupServices := s.SeedSupportGroupServices(n/2, services, supportGroups) + supportGroupUsers := s.SeedSupportGroupUsers(n/2, users, supportGroups) activities := s.SeedActivities(n) - activityHasServices := s.SeedActivityHasServices(n, activities, services) - activityHasIssues := s.SeedActivityHasIssues(n, activities, issues) + activityHasServices := s.SeedActivityHasServices(n/2, activities, services) + activityHasIssues := s.SeedActivityHasIssues(n/2, activities, issues) evidences := s.SeedEvidences(n, activities, users) - componentVersionIssues := s.SeedComponentVersionIssues(n, componentVersions, issues) + componentVersionIssues := s.SeedComponentVersionIssues(n/2, componentVersions, issues) issueMatches := s.SeedIssueMatches(n, issues, componentInstances, users) - issueMatchEvidences := s.SeedIssueMatchEvidence(n, issueMatches, evidences) - issueRepositoryServices := s.SeedIssueRepositoryServices(n, services, repos) + issueMatchEvidences := s.SeedIssueMatchEvidence(n/2, issueMatches, evidences) + issueRepositoryServices := s.SeedIssueRepositoryServices(n/2, services, repos) issueMatchChanges := s.SeedIssueMatchChanges(n, issueMatches, activities) return &SeedCollection{