Google Cloud Professional Cloud DevOps Engineer — Question 137

You are developing reusable infrastructure as code modules. Each module contains integration tests that launch the module in a test project. You are using GitHub for source control. You need to continuously test your feature branch and ensure that all code is tested before changes are accepted. You need to implement a solution to automate the integration tests. What should you do?

Answer options

Correct answer: D

Explanation

The correct answer is D because it ensures that integration tests are automatically triggered for every GitHub pull request, allowing for immediate feedback on the changes. Option A is less efficient as it runs tests periodically rather than on each pull request. Option B relies on manual effort from reviewers, which is not a scalable solution. Option C runs tests only after a pull request is merged, which does not allow for issues to be identified before merging.