Skip to content

Commit

Permalink
Merge branch 'main' into mut_rl_sg
Browse files Browse the repository at this point in the history
  • Loading branch information
drochow authored Jul 16, 2024
2 parents 233b506 + 09243f1 commit 7366055
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 11 deletions.
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,60 @@ For a detailed understanding of the system's architecture and design, refer to t

## Requirements and Setup

*Insert a short description what is required to get your project running...*
The application can be configured using environment variables. These variables are stored in a `.env` file at the root of the project.
For configuring tests, there is a separate `.test.env` file.

Here's a basic example of what the .env file could look like:

```
DB_USER=my_username
DB_PASSWORD=my_password
DB_ROOT_PASSWORD=my_password
DB_NAME=heureka
DB_ADDRESS=localhost
DB_PORT=3306
DB_SCHEMA=internal/database/mariadb/init/schema.sql
DB_CONTAINER_IMAGE=mariadb:latest
DOCKER_IMAGE_REGISTRY=hub.docker.com
DOCKER_CREDENTIAL_STORE=docker-credential-desktop
LOG_PRETTY_PRINT=true
LOCAL_TEST_DB=true
SEED_MODE=false
```

### Docker

The `docker-compose.yml` file defines two profiles: `db` for the `heureka-db` service and `heureka` for the `heureka-app` service.
To start a specific service with its profile, use the --profile option followed by the profile name.

For example, to start the heureka-db service, run:
```
docker-compose --profile db up
```

And to start the heureka-app service, run:
```
docker-compose --profile heureka up
```

To start both services at the same time, run:
```
docker-compose --profile db --profile heureka up
```

### Makefile

Alternatively, the application can be started by using the provided Makefile:

```
make start-all-heureka
```

## Support, Feedback, Contributing

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/onsi/gomega v1.33.1
github.com/onuryilmaz/ginprom v0.0.2
github.com/prometheus/client_golang v1.19.1
github.com/samber/lo v1.44.0
github.com/samber/lo v1.45.0
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
github.com/vektah/gqlparser/v2 v2.5.16
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/samber/lo v1.44.0 h1:5il56KxRE+GHsm1IR+sZ/6J42NODigFiqCWpSc2dybA=
github.com/samber/lo v1.44.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU=
github.com/samber/lo v1.45.0 h1:TPK85Y30Lv9Jh8s3TrJeA94u1hwcbFA9JObx/vT6lYU=
github.com/samber/lo v1.45.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU=
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
Expand Down
14 changes: 7 additions & 7 deletions internal/database/mariadb/test/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 7366055

Please sign in to comment.