Skip to content

Commit ac7f31c

Browse files
committed
add pull subscription expiration_policy test
1 parent 88358dd commit ac7f31c

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

examples/simple/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ module "pubsub" {
3737
enable_exactly_once_delivery = true
3838
},
3939
{
40-
name = "pull2"
41-
minimum_backoff = "10s"
42-
maximum_backoff = "600s"
40+
name = "pull2"
41+
minimum_backoff = "10s"
42+
maximum_backoff = "600s"
43+
expiration_policy = "1209600s" // two weeks
4344
},
4445
]
4546

test/integration/simple/simple_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func TestSimple(t *testing.T) {
6767
op = gcloud.Runf(t, "pubsub subscriptions describe pull2 --project=%s", projectId)
6868
assert.Equal("600s", op.Get("retryPolicy.maximumBackoff").String(), "has expected maximum_backoff")
6969
assert.Equal("10s", op.Get("retryPolicy.minimumBackoff").String(), "has expected minimum_backoff")
70+
assert.Equal("1209600s", op.Get("expirationPolicy.ttl").String(), "has expected expiration_policy")
7071

7172
op = gcloud.Runf(t, "pubsub schemas describe example --project=%s", projectId)
7273
assert.Equal(fmt.Sprintf("projects/%s/schemas/example", projectId), op.Get("name").String(), "has expected name")

0 commit comments

Comments
 (0)