internal/rpmmd: change ignoressl to pointer

Change the `IgnoreSSL` field in `rpmmd.RepoConfig`
to a pointer. This will be later used to configure
the `SSLVerify` field in the yum repo stage.
This commit is contained in:
Gianluca Zuccarelli 2023-05-02 17:37:48 +01:00 committed by Achilleas Koutsou
parent 173de3eba4
commit ce299dfa0e
13 changed files with 89 additions and 82 deletions

View file

@ -40,7 +40,7 @@ type RepoConfig struct {
CheckGPG *bool `json:"check_gpg,omitempty"`
CheckRepoGPG *bool `json:"check_repo_gpg,omitempty"`
Priority *int `json:"priority,omitempty"`
IgnoreSSL bool `json:"ignore_ssl,omitempty"`
IgnoreSSL *bool `json:"ignore_ssl,omitempty"`
MetadataExpire string `json:"metadata_expire,omitempty"`
RHSM bool `json:"rhsm,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
@ -67,7 +67,7 @@ func (r *RepoConfig) Hash() string {
ats(r.GPGKeys)+
bpts(r.CheckGPG)+
bpts(r.CheckRepoGPG)+
bts(r.IgnoreSSL)+
bpts(r.IgnoreSSL)+
r.MetadataExpire+
bts(r.RHSM))))
}

View file

@ -222,7 +222,7 @@ func TestOldWorkerRepositoryCompatUnmarshal(t *testing.T) {
GPGKeys: []string{"key1", "key2"},
CheckGPG: common.ToPtr(true),
CheckRepoGPG: common.ToPtr(true),
IgnoreSSL: true,
IgnoreSSL: common.ToPtr(true),
Priority: common.ToPtr(10),
MetadataExpire: "test",
RHSM: true,
@ -276,7 +276,7 @@ func TestOldWorkerRepositoryCompatMarshal(t *testing.T) {
CheckGPG: common.ToPtr(true),
CheckRepoGPG: common.ToPtr(true),
Priority: common.ToPtr(10),
IgnoreSSL: true,
IgnoreSSL: common.ToPtr(true),
MetadataExpire: "test",
RHSM: true,
Enabled: common.ToPtr(true),