Skip to content
Permalink
Browse files
feat: Add fields for Pub/Sub triggers (#457)
Committer: @gleeper
PiperOrigin-RevId: 368533270

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Apr 14 16:39:41 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 9a9e29627a715077cd8e33c0d2bd549437039bd0
Source-Link: googleapis/googleapis@9a9e296
  • Loading branch information
yoshi-automation committed Apr 16, 2021
1 parent ad05975 commit 55b10de722d09d8a861fc1325eeda14a208add15
Show file tree
Hide file tree
Showing 10 changed files with 2,603 additions and 42 deletions.
@@ -51,6 +51,7 @@
import com.google.cloudbuild.v1.ListBuildsResponse;
import com.google.cloudbuild.v1.ListWorkerPoolsRequest;
import com.google.cloudbuild.v1.ListWorkerPoolsResponse;
import com.google.cloudbuild.v1.PubsubConfig;
import com.google.cloudbuild.v1.ReceiveTriggerWebhookRequest;
import com.google.cloudbuild.v1.ReceiveTriggerWebhookResponse;
import com.google.cloudbuild.v1.RepoSource;
@@ -461,11 +462,13 @@ public void createBuildTriggerTest() throws Exception {
.addAllTags(new ArrayList<String>())
.setTriggerTemplate(RepoSource.newBuilder().build())
.setGithub(GitHubEventsConfig.newBuilder().build())
.setPubsubConfig(PubsubConfig.newBuilder().build())
.setCreateTime(Timestamp.newBuilder().build())
.setDisabled(true)
.putAllSubstitutions(new HashMap<String, String>())
.addAllIgnoredFiles(new ArrayList<String>())
.addAllIncludedFiles(new ArrayList<String>())
.setFilter("filter-1274492040")
.build();
mockCloudBuild.addResponse(expectedResponse);

@@ -512,11 +515,13 @@ public void getBuildTriggerTest() throws Exception {
.addAllTags(new ArrayList<String>())
.setTriggerTemplate(RepoSource.newBuilder().build())
.setGithub(GitHubEventsConfig.newBuilder().build())
.setPubsubConfig(PubsubConfig.newBuilder().build())
.setCreateTime(Timestamp.newBuilder().build())
.setDisabled(true)
.putAllSubstitutions(new HashMap<String, String>())
.addAllIgnoredFiles(new ArrayList<String>())
.addAllIncludedFiles(new ArrayList<String>())
.setFilter("filter-1274492040")
.build();
mockCloudBuild.addResponse(expectedResponse);

@@ -644,11 +649,13 @@ public void updateBuildTriggerTest() throws Exception {
.addAllTags(new ArrayList<String>())
.setTriggerTemplate(RepoSource.newBuilder().build())
.setGithub(GitHubEventsConfig.newBuilder().build())
.setPubsubConfig(PubsubConfig.newBuilder().build())
.setCreateTime(Timestamp.newBuilder().build())
.setDisabled(true)
.putAllSubstitutions(new HashMap<String, String>())
.addAllIgnoredFiles(new ArrayList<String>())
.addAllIncludedFiles(new ArrayList<String>())
.setFilter("filter-1274492040")
.build();
mockCloudBuild.addResponse(expectedResponse);

0 comments on commit 55b10de

Please sign in to comment.