Skip to content

Reuse installed ginkgo and use cleaner binary check#609

Open
jorbaum wants to merge 1 commit intocloudfoundry:mainfrom
jorbaum:minor-test-script-improvements
Open

Reuse installed ginkgo and use cleaner binary check#609
jorbaum wants to merge 1 commit intocloudfoundry:mainfrom
jorbaum:minor-test-script-improvements

Conversation

@jorbaum
Copy link
Contributor

@jorbaum jorbaum commented Feb 24, 2026

Description

Adjusts test scripts just like cloudfoundry/loggregator-agent-release#717 :

  • reuse ginkgo instead of recompiling every time, same as we are already doing with golangci-lint
  • cleaner check for binary removing three lines of code ;)
  • fix golangci-lint complaints

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing performed?

  • Unit tests
  • Integration tests
  • Acceptance tests

Checklist:

  • This PR is being made against the main branch, or relevant version branch
  • I have made corresponding changes to the documentation
  • I have added testing for my changes

Copy link
Contributor

@chombium chombium left a comment

Choose a reason for hiding this comment

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

Please change the linting directives


func (c *CAPIClient) HasApp(sourceID, authToken string) bool {
req, err := http.NewRequest(http.MethodGet, c.addr+"/v3/apps/"+sourceID, nil)
req, err := http.NewRequest(http.MethodGet, c.addr+"/v3/apps/"+sourceID, nil) //#nosec G704
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use //nolint:gosec instead of #nosec as we are using gosec via golang and not directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. There are several instances where there nosec is already used in this code base. Do you want me to change those as well?

Copy link
Contributor Author

@jorbaum jorbaum left a comment

Choose a reason for hiding this comment

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

Worked in the comments.

@jorbaum jorbaum force-pushed the minor-test-script-improvements branch 3 times, most recently from f6e911d to e472868 Compare March 3, 2026 10:30
Also:

* Replace golang.org/x/net/context with context
* Ignore G115
    numOfRoutes is never negative anyway
* Ignore gosec G117
    ClientSecret is not exposed to outside.
* Ignore G704
    URI address is not provided by user but by server-side config.
* Ignore G704 SSRF via taint analysis in tests
    There is no user controlled input
* Prefer nolint over nosec everywhere
@jorbaum jorbaum force-pushed the minor-test-script-improvements branch from e472868 to c5a872e Compare March 3, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants