Yea, this just seems like someone is trying to rationalize avoiding work. Injecting secrets is like one of the base steps of CI/CD. How else would you make sure this works in different environments? All of that might be unnecessary for the most base case ever, but it's one of those things you solve once and use it for the rest of the project.
I'm not sure why the author thinks this required putting the credentials in the code itself. Heck, I'd argue that this integration test should be setting up the bucket and contents as part of the setup for the test itself, pulling the credentials from some sort of secrets manager.