From b90d59438501c8dfa199617e45dda512ad45a7a3 Mon Sep 17 00:00:00 2001 From: upodroid Date: Tue, 5 Jan 2021 22:51:19 +0000 Subject: [PATCH 1/2] mark field as updatable Co-authored-by: upodroid --- products/pubsub/api.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/products/pubsub/api.yaml b/products/pubsub/api.yaml index ed1b608b1090..dd866d8a3a5e 100644 --- a/products/pubsub/api.yaml +++ b/products/pubsub/api.yaml @@ -57,7 +57,6 @@ objects: (`service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com`) must have `roles/cloudkms.cryptoKeyEncrypterDecrypter` to use this feature. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*` - input: true - !ruby/object:Api::Type::KeyValuePairs name: 'labels' description: | From f37e367837b036f70a7d633fd056f4c5905e39ec Mon Sep 17 00:00:00 2001 From: upodroid Date: Tue, 27 Apr 2021 00:04:59 +0100 Subject: [PATCH 2/2] workflows are patchable now Co-authored-by: upodroid --- mmv1/products/workflows/api.yaml | 2 -- .../tests/resource_workflows_workflow_test.go | 20 ++++++++----------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/mmv1/products/workflows/api.yaml b/mmv1/products/workflows/api.yaml index 9352318d7451..e7080616f40a 100644 --- a/mmv1/products/workflows/api.yaml +++ b/mmv1/products/workflows/api.yaml @@ -94,7 +94,6 @@ objects: A set of key/value label pairs to assign to this Workflow. - !ruby/object:Api::Type::String name: 'serviceAccount' - input: true description: | Name of the service account associated with the latest workflow version. This service account represents the identity of the workflow and determines what permissions the workflow has. @@ -102,7 +101,6 @@ objects: Format: projects/{project}/serviceAccounts/{account}. - !ruby/object:Api::Type::String name: 'sourceContents' - input: true description: | Workflow code to be executed. The size limit is 32KB. - !ruby/object:Api::Type::String diff --git a/mmv1/third_party/terraform/tests/resource_workflows_workflow_test.go b/mmv1/third_party/terraform/tests/resource_workflows_workflow_test.go index 499bd73d3d80..ddc7eead7855 100644 --- a/mmv1/third_party/terraform/tests/resource_workflows_workflow_test.go +++ b/mmv1/third_party/terraform/tests/resource_workflows_workflow_test.go @@ -8,11 +8,11 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) -func TestAccWorkflowsWorkflow_basic(t *testing.T) { +func TestAccWorkflowsWorkflow_Update(t *testing.T) { // Custom test written to test diffs t.Parallel() - bucketName := fmt.Sprintf("tf-test-acc-bucket-%d", randInt(t)) + workflowName := fmt.Sprintf("tf-test-acc-workflow-%d", randInt(t)) vcrTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -20,16 +20,16 @@ func TestAccWorkflowsWorkflow_basic(t *testing.T) { CheckDestroy: testAccCheckWorkflowsWorkflowDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccWorkflowsWorkflow_basic(bucketName), + Config: testAccWorkflowsWorkflow_Update(workflowName), }, { - Config: testAccWorkflowsWorkflow_newBucket(bucketName), + Config: testAccWorkflowsWorkflow_Updated(workflowName), }, }, }) } -func testAccWorkflowsWorkflow_basic(name string) string { +func testAccWorkflowsWorkflow_Update(name string) string { return fmt.Sprintf(` resource "google_workflows_workflow" "example" { name = "%s" @@ -66,12 +66,8 @@ EOF `, name) } -func testAccWorkflowsWorkflow_newBucket(name string) string { +func testAccWorkflowsWorkflow_Updated(name string) string { return fmt.Sprintf(` -resource "google_storage_bucket" "bucket" { - name = "%s" -} - resource "google_workflows_workflow" "example" { name = "%s" region = "us-central1" @@ -95,7 +91,7 @@ resource "google_workflows_workflow" "example" { - readWikipedia: call: http.get args: - url: https://en.wikipedia.org/w/api.php + url: https:/fi.wikipedia.org/w/api.php query: action: opensearch search: $${CurrentDateTime.body.dayOfTheWeek} @@ -104,7 +100,7 @@ resource "google_workflows_workflow" "example" { return: $${WikiResult.body[1]} EOF } -`, name, name) +`, name) } func TestWorkflowsWorkflowStateUpgradeV0(t *testing.T) {