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:
parent
173de3eba4
commit
ce299dfa0e
13 changed files with 89 additions and 82 deletions
|
|
@ -371,7 +371,7 @@ func (h *apiHandlers) PostCompose(ctx echo.Context) error {
|
|||
}
|
||||
|
||||
if repo.SslVerify != nil {
|
||||
repoCustomization.SSLVerify = *repo.SslVerify
|
||||
repoCustomization.SSLVerify = repo.SslVerify
|
||||
}
|
||||
|
||||
if repo.Priority != nil {
|
||||
|
|
@ -1441,7 +1441,7 @@ func genRepoConfig(repo Repository) (*rpmmd.RepoConfig, error) {
|
|||
repoConfig.GPGKeys = []string{*repo.Gpgkey}
|
||||
}
|
||||
if repo.IgnoreSsl != nil {
|
||||
repoConfig.IgnoreSSL = *repo.IgnoreSsl
|
||||
repoConfig.IgnoreSSL = repo.IgnoreSsl
|
||||
}
|
||||
|
||||
if repo.CheckGpg != nil {
|
||||
|
|
@ -1451,7 +1451,7 @@ func genRepoConfig(repo Repository) (*rpmmd.RepoConfig, error) {
|
|||
repoConfig.GPGKeys = []string{*repo.Gpgkey}
|
||||
}
|
||||
if repo.IgnoreSsl != nil {
|
||||
repoConfig.IgnoreSSL = *repo.IgnoreSsl
|
||||
repoConfig.IgnoreSSL = repo.IgnoreSsl
|
||||
}
|
||||
if repo.CheckRepoGpg != nil {
|
||||
repoConfig.CheckRepoGPG = repo.CheckRepoGpg
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ func TestRepoConfigConversion(t *testing.T) {
|
|||
MirrorList: "",
|
||||
GPGKeys: []string{"some-kind-of-key"},
|
||||
CheckGPG: common.ToPtr(true),
|
||||
IgnoreSSL: false,
|
||||
IgnoreSSL: common.ToPtr(false),
|
||||
MetadataExpire: "",
|
||||
RHSM: false,
|
||||
ImageTypeTags: nil,
|
||||
|
|
@ -133,7 +133,7 @@ func TestRepoConfigConversion(t *testing.T) {
|
|||
Metalink: "", // since BaseURL is specified, MetaLink is not copied
|
||||
MirrorList: "", // since BaseURL is specified, MirrorList is not copied
|
||||
CheckGPG: nil,
|
||||
IgnoreSSL: true,
|
||||
IgnoreSSL: common.ToPtr(true),
|
||||
MetadataExpire: "",
|
||||
RHSM: false,
|
||||
ImageTypeTags: nil,
|
||||
|
|
@ -155,7 +155,7 @@ func TestRepoConfigConversion(t *testing.T) {
|
|||
Metalink: "", // since MirrorList is specified, MetaLink is not copied
|
||||
MirrorList: "http://example.org/mirrorlist",
|
||||
CheckGPG: nil,
|
||||
IgnoreSSL: true,
|
||||
IgnoreSSL: common.ToPtr(true),
|
||||
MetadataExpire: "",
|
||||
RHSM: false,
|
||||
ImageTypeTags: nil,
|
||||
|
|
@ -177,7 +177,7 @@ func TestRepoConfigConversion(t *testing.T) {
|
|||
Metalink: "http://example.org/metalink",
|
||||
MirrorList: "",
|
||||
CheckGPG: nil,
|
||||
IgnoreSSL: true,
|
||||
IgnoreSSL: common.ToPtr(true),
|
||||
MetadataExpire: "",
|
||||
RHSM: true,
|
||||
ImageTypeTags: nil,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue