Skip to content

pkg/git: AuthOptions.Validate() test improvements#463

Merged
hiddeco merged 1 commit intofluxcd:git-auth-optsfrom
darkowlzz:git-auth-opts-patch-1
Oct 25, 2021
Merged

pkg/git: AuthOptions.Validate() test improvements#463
hiddeco merged 1 commit intofluxcd:git-auth-optsfrom
darkowlzz:git-auth-opts-patch-1

Conversation

@darkowlzz
Copy link
Copy Markdown
Contributor

  • Adds more test cases for Validate() and an error for unknown transport.
  • Add Fixture suffix to a test constant malformedKeyRing.

⚠️ target branch of the PR is git-auth-opts.

Adds to #462 .

Comment thread pkg/git/options.go
Comment thread pkg/git/options_test.go
name: "Valid HTTPS transport",
opts: AuthOptions{
Transport: HTTPS,
Username: "example",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving one of these (HTTP or HTTPS test) would cover an additional test case: HTTP/S transport definition without any config, which should be valid as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added. Thanks.

Adds more test cases for Validate() and an error for unknown transport.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
@darkowlzz darkowlzz force-pushed the git-auth-opts-patch-1 branch from 615b2c8 to ad4e906 Compare October 24, 2021 17:06
@hiddeco hiddeco merged commit ad9b382 into fluxcd:git-auth-opts Oct 25, 2021
@darkowlzz darkowlzz deleted the git-auth-opts-patch-1 branch October 25, 2021 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants