Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test distro and mock dnf json cleanup #159

Merged
merged 7 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.0
version: v1.54.2
args: --verbose --timeout 5m0s

prepare:
Expand Down
11 changes: 8 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
linters-settings:
govet:
disable:
- shadow # default value recommended by golangci
- shadow # default value recommended by golangci
- composites

gosec:
excludes:
- G101

linters:
enable:
- gosec
Expand All @@ -17,5 +21,6 @@ issues:
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-issues-per-linter: 0

# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
# Maximum count of issues with the same text. Set to 0 to disable. Default
# is 3.
max-same-issues: 0
116 changes: 0 additions & 116 deletions cmd/mock-dnf-json/dnf-json.go

This file was deleted.

9 changes: 5 additions & 4 deletions cmd/osbuild-pipeline/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,15 @@ func main() {
}

repos := make([]rpmmd.RepoConfig, len(composeRequest.Repositories))
for i, repo := range composeRequest.Repositories {
for idx := range composeRequest.Repositories {
repo := composeRequest.Repositories[idx]
repoName := repo.Name
if repoName == "" {
repoName = fmt.Sprintf("repo-%d", i)
repoName = fmt.Sprintf("repo-%d", idx)
}
repoId := repo.Id
if repoId == "" {
repoId = fmt.Sprintf("repo-%d", i)
repoId = fmt.Sprintf("repo-%d", idx)
}
var urls []string
if repo.BaseURL != "" {
Expand All @@ -158,7 +159,7 @@ func main() {
keys = []string{repo.GPGKey}
}

repos[i] = rpmmd.RepoConfig{
repos[idx] = rpmmd.RepoConfig{
Id: repoId,
Name: repoName,
BaseURLs: urls,
Expand Down
Loading
Loading