bugfix: OIDCConfig based providers are not respecting flags and configs (#2299)

* add full support for all oidc config based providers to use and respect all configs set via OIDCConfig

* add changelog entry

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
This commit is contained in:
Jan Larwig
2023-11-25 11:32:31 +00:00
committed by GitHub
co-authored by Joel Speed
parent 0ddb5e7b61
commit fc6e7fdbd1
8 changed files with 36 additions and 29 deletions
+7 -5
View File
@@ -14,7 +14,7 @@ import (
. "github.com/onsi/gomega"
)
func testGitLabProvider(hostname, scope string, opts options.GitLabOptions) (*GitLabProvider, error) {
func testGitLabProvider(hostname, scope string, opts options.Provider) (*GitLabProvider, error) {
p, err := NewGitLabProvider(
&ProviderData{
ProviderName: "",
@@ -162,7 +162,7 @@ var _ = Describe("Gitlab Provider Tests", func() {
bURL, err := url.Parse(b.URL)
Expect(err).To(BeNil())
p, err = testGitLabProvider(bURL.Host, "", options.GitLabOptions{})
p, err = testGitLabProvider(bURL.Host, "", options.Provider{})
Expect(err).ToNot(HaveOccurred())
})
@@ -237,9 +237,11 @@ var _ = Describe("Gitlab Provider Tests", func() {
bURL, err := url.Parse(b.URL)
Expect(err).To(BeNil())
p, err := testGitLabProvider(bURL.Host, in.scope, options.GitLabOptions{
Group: in.allowedGroups,
Projects: in.allowedProjects,
p, err := testGitLabProvider(bURL.Host, in.scope, options.Provider{
GitLabConfig: options.GitLabOptions{
Group: in.allowedGroups,
Projects: in.allowedProjects,
},
})
if in.expectedError == nil {
Expect(err).To(BeNil())