rpmmd/repository: repoconfig pointers
Convert some of the fields in the `RepoConfig` struct to pointers. Since `RepoConfig` will be used to convert custom repositories to an array of `osbuild.YumRepository`, we need to ensure that fields that are not set explicitly are not saved to the `/etc/yum.repos.d` repository files.
This commit is contained in:
parent
75e2138878
commit
d44703cdc8
14 changed files with 78 additions and 51 deletions
|
|
@ -63,12 +63,12 @@ func createWeldrAPI(tempdir string, fixtureGenerator rpmmd_mock.FixtureGenerator
|
|||
rr := reporegistry.NewFromDistrosRepoConfigs(rpmmd.DistrosRepoConfigs{
|
||||
test_distro.TestDistroName: {
|
||||
test_distro.TestArchName: {
|
||||
{Name: "test-id", BaseURLs: []string{"http://example.com/test/os/x86_64"}, CheckGPG: true},
|
||||
{Name: "test-id", BaseURLs: []string{"http://example.com/test/os/x86_64"}, CheckGPG: common.ToPtr(true)},
|
||||
},
|
||||
},
|
||||
test_distro.TestDistro2Name: {
|
||||
test_distro.TestArchName: {
|
||||
{Name: "test-id-2", BaseURLs: []string{"http://example.com/test-2/os/x86_64"}, CheckGPG: true},
|
||||
{Name: "test-id-2", BaseURLs: []string{"http://example.com/test-2/os/x86_64"}, CheckGPG: common.ToPtr(true)},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
@ -112,12 +112,12 @@ func createWeldrAPI2(tempdir string, fixtureGenerator rpmmd_mock.FixtureGenerato
|
|||
rr := reporegistry.NewFromDistrosRepoConfigs(rpmmd.DistrosRepoConfigs{
|
||||
test_distro.TestDistroName: {
|
||||
test_distro.TestArch2Name: {
|
||||
{Name: "test-id", BaseURLs: []string{"http://example.com/test/os/x86_64"}, CheckGPG: true},
|
||||
{Name: "test-id", BaseURLs: []string{"http://example.com/test/os/x86_64"}, CheckGPG: common.ToPtr(true)},
|
||||
},
|
||||
},
|
||||
test_distro.TestDistro2Name: {
|
||||
test_distro.TestArch2Name: {
|
||||
{Name: "test-id-2", BaseURLs: []string{"http://example.com/test-2/os/x86_64"}, CheckGPG: true},
|
||||
{Name: "test-id-2", BaseURLs: []string{"http://example.com/test-2/os/x86_64"}, CheckGPG: common.ToPtr(true)},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue