Skip to content

Commit

Permalink
srcconfig: Update test case to utilize src bundle
Browse files Browse the repository at this point in the history
Verify functionality of source config bundle by updating the test case
to obtain srpm for repo using custom src bundle.
  • Loading branch information
manith-arista committed Sep 18, 2023
1 parent c2b4811 commit ae06bd0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
18 changes: 10 additions & 8 deletions cmd/create_srpm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ func testCreateSrpm(t *testing.T,

t.Logf("DestDir: %s", destDir)
testutil.SetupViperConfig(
"", // srcDir
workingDir, destDir,
"", // depsDir
"", // repoHost,
"", // dnfConfigFile
"", // srcRepoHost
"", // srcConfigFile
"", // srcDir
workingDir, // workingDir
destDir, // destDir
"", // depsDir
"", // repoHost,
"", // dnfConfigFile
"", // srcRepoHost
"testData/configfiles/srcconfig.yaml", // srcConfigFile
"", // srcRepoPathPrefix
)
defer viper.Reset()
if sources != nil {
Expand Down Expand Up @@ -90,6 +92,6 @@ func TestCreateSrpmUnmodified(t *testing.T) {
}
testCreateSrpm(t,
"debugedit-2", "debugedit", true,
[]string{"debugedit-5.0-3.el9.src.rpm"},
[]string{"debugedit.src.rpm"},
sources)
}
7 changes: 7 additions & 0 deletions cmd/testData/configfiles/srcconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yamllint disable rule:line-length
source-bundle:
el9:
url-format: "{{.Host}}/{{.PathPrefix}}/eext-testData/{{.Version}}/{{.PkgName}}.src.rpm"
version-labels:
default: el9/9-1/v20230810
5 changes: 4 additions & 1 deletion cmd/testData/debugedit-2/eext.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
package:
- name: debugedit
upstream-sources:
- full-url: "{{.Host}}/artifactory/eext-sources/eext-testData/debugedit-5.0-3.el9.src.rpm"
- source-bundle:
name: el9
override:
version: el9/9-1/v20230911
type: unmodified-srpm
build:
repo-bundle:
Expand Down

0 comments on commit ae06bd0

Please sign in to comment.