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
|
|
@ -108,7 +108,7 @@ func TestRepoConfigConversion(t *testing.T) {
|
|||
Metalink: "",
|
||||
MirrorList: "",
|
||||
GPGKeys: []string{"some-kind-of-key"},
|
||||
CheckGPG: true,
|
||||
CheckGPG: common.ToPtr(true),
|
||||
IgnoreSSL: false,
|
||||
MetadataExpire: "",
|
||||
RHSM: false,
|
||||
|
|
@ -131,7 +131,7 @@ func TestRepoConfigConversion(t *testing.T) {
|
|||
BaseURLs: []string{"http://base.url"},
|
||||
Metalink: "", // since BaseURL is specified, MetaLink is not copied
|
||||
MirrorList: "", // since BaseURL is specified, MirrorList is not copied
|
||||
CheckGPG: false,
|
||||
CheckGPG: nil,
|
||||
IgnoreSSL: true,
|
||||
MetadataExpire: "",
|
||||
RHSM: false,
|
||||
|
|
@ -153,7 +153,7 @@ func TestRepoConfigConversion(t *testing.T) {
|
|||
Name: "",
|
||||
Metalink: "", // since MirrorList is specified, MetaLink is not copied
|
||||
MirrorList: "http://example.org/mirrorlist",
|
||||
CheckGPG: false,
|
||||
CheckGPG: nil,
|
||||
IgnoreSSL: true,
|
||||
MetadataExpire: "",
|
||||
RHSM: false,
|
||||
|
|
@ -175,7 +175,7 @@ func TestRepoConfigConversion(t *testing.T) {
|
|||
Name: "",
|
||||
Metalink: "http://example.org/metalink",
|
||||
MirrorList: "",
|
||||
CheckGPG: false,
|
||||
CheckGPG: nil,
|
||||
IgnoreSSL: true,
|
||||
MetadataExpire: "",
|
||||
RHSM: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue