Skip to content

make test-only behavior actually test-only#486

Closed
brettfo wants to merge 1 commit intomainfrom
dev/bretfo/test-encoding
Closed

make test-only behavior actually test-only#486
brettfo wants to merge 1 commit intomainfrom
dev/bretfo/test-encoding

Conversation

@brettfo
Copy link
Contributor

@brettfo brettfo commented Jul 31, 2025

Test-only code shows behavior changes in production. Based on the comment, this should be fixed for production scenarios.

jasonpaulos
jasonpaulos previously approved these changes Jul 31, 2025
@@ -254,6 +255,11 @@ func decodeWrapper(kind string, data []byte) (actual *model.UpdateWrapper, err e

// to avoid having massive base64 encoded strings in the test fixtures, replace the content with a hash
func replaceBinaryWithHash(files []model.DependencyFile) []model.DependencyFile {
Copy link
Member

Choose a reason for hiding this comment

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

This method was added for the smoke tests, which use Dependabot CLI's -o/--output to generate test fixtures. So testing.Testing() doesn't apply here, the CLI is running in "production" mode.

You should use stdout which does not have this behavior (thanks to #465) or you can start your own server to receive the API calls directly using the --api-url option.

Copy link
Contributor

@rhyskoedijk rhyskoedijk Aug 3, 2025

Choose a reason for hiding this comment

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

Thanks @brettfo for looking in to this. Based on this comment, sounds like the issue is ultimately because we're reading output from the scenario file and the BOM changes are now expected behavior. We'll need to change to either read from stdout or implement an API server

@jakecoffman
Copy link
Member

Closing per @rhyskoedijk's comment. This is working as expected.

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.

4 participants