-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests(*): added tests for various components #61
Conversation
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
cmd/autobump/config_test.go
Outdated
// Arrange | ||
globalConfig := GlobalConfig{ | ||
Projects: []ProjectConfig{ | ||
{Path: "/home/user/test", ProjectAccessToken: "glpat-ABCDEFGHIJKLMNOPQRST"}, |
Check failure
Code scanning / SonarCloud
GitLab tokens should not be disclosed
cmd/autobump/config_test.go
Outdated
}, | ||
LanguagesConfig: map[string]LanguageConfig{"Go": {}}, | ||
GpgKeyPath: "/home/user/.gnupg/autobump.asc", | ||
GitLabAccessToken: "glpat-ABCDEFGHIJKLMNOPQRST", |
Check failure
Code scanning / SonarCloud
GitLab tokens should not be disclosed
cmd/autobump/git_test.go
Outdated
func TestGetAuthMethods_Success(t *testing.T) { | ||
// Arrange | ||
globalConfig := GlobalConfig{ | ||
GitLabAccessToken: "glpat-ABCDEFGHIJKLMNOPQRST", |
Check failure
Code scanning / SonarCloud
GitLab tokens should not be disclosed
cmd/autobump/git_test.go
Outdated
GitLabAccessToken: "glpat-ABCDEFGHIJKLMNOPQRST", | ||
} | ||
projectConfig := ProjectConfig{ | ||
ProjectAccessToken: "glpat-ABCDEFGHIJKLMNOPQRST", |
Check failure
Code scanning / SonarCloud
GitLab tokens should not be disclosed
cmd/autobump/git_test.go
Outdated
basicAuthFound := false | ||
for _, authMethod := range authMethods { | ||
if auth, ok := authMethod.(*http.BasicAuth); ok { | ||
if auth.Password != "glpat-ABCDEFGHIJKLMNOPQRST" { |
Check failure
Code scanning / SonarCloud
GitLab tokens should not be disclosed
cmd/autobump/git_test.go
Outdated
for _, authMethod := range authMethods { | ||
if auth, ok := authMethod.(*http.BasicAuth); ok { | ||
if auth.Password != "glpat-ABCDEFGHIJKLMNOPQRST" { | ||
t.Errorf("expected password to be 'glpat-ABCDEFGHIJKLMNOPQRST', got %v", auth.Password) |
Check failure
Code scanning / SonarCloud
GitLab tokens should not be disclosed
config
, git
, project
, and utils
components
I need this PR to enter first, so we can correct Horusec and Semgrep here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we solve the comments?
Amazing work my friend!!!! I liked very much 💯 🥇 |
config
, git
, project
, and utils
componentsSigned-off-by: k4yt3x <i@k4yt3x.com>
|
🚦 Quality checklist
CHANGELOG.md
?go test
)