Skip to content

Commit

Permalink
OCM-12442 | feat: Adding e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
den-rgb committed Nov 19, 2024
1 parent b23960a commit 1972c1a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/e2e/idps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,26 @@ var _ = Describe("Identity Providers", ci.Day2, ci.FeatureIDP, func() {
args = getDefaultGoogleArgs(idpName)
args.ClientSecret = helper.EmptyStringPointer
validateIDPArgAgainstErrorSubstrings(idpServices.google, args, "Attribute 'client_secret' is mandatory")

By("Create github idp with invalid hostname")
args = getDefaultGitHubArgs(idpName)
args.HostedDomain = helper.StringPointer("github.com")
validateIDPArgAgainstErrorSubstrings(idpServices.github, args, "hostname cannot be equal to [*.]github.com")

By("Create github idp with invalid hostname suffix")
args = getDefaultGitHubArgs(idpName)
args.HostedDomain = helper.StringPointer("example.github.com")
validateIDPArgAgainstErrorSubstrings(idpServices.github, args, "hostname cannot be equal to [*.]github.com")

By("Create github idp with invalid hostname (not a DNS subdomain or IP address)")
args = getDefaultGitHubArgs(idpName)
args.HostedDomain = helper.StringPointer(" invalid hostname ")
validateIDPArgAgainstErrorSubstrings(idpServices.github, args, "hostname must be a valid DNS subdomain or IP address")

By("Create github idp with empty hostname")
args = getDefaultGitHubArgs(idpName)
args.HostedDomain = helper.EmptyStringPointer
validateIDPArgAgainstErrorSubstrings(idpServices.github, args, "Attribute 'hostname' is mandatory")
})

It("htpasswd with empty user-password list will fail - [id:66409]", ci.Medium, func() {
Expand Down

0 comments on commit 1972c1a

Please sign in to comment.