Skip to content

Commit

Permalink
Add regression test for RedriveAllowPolicy diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
csssuf committed Nov 15, 2024
1 parent 380ade9 commit d4ae5a7
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
8 changes: 8 additions & 0 deletions provider/provider_python_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ func TestRegress4457(t *testing.T) {
t.Logf("%s", previewResult.StdErr)
}

func TestRegress4760(t *testing.T) {
ptest := pulumiTest(t, filepath.Join("test-programs", "regress-4760"))
upResult := ptest.Up(t)
t.Logf("#%v", upResult.Summary)
result := ptest.Preview(t, optpreview.ExpectNoChanges())
t.Logf("#%v", result.ChangeSummary)
}

func getPythonBaseOptions(t *testing.T) integration.ProgramTestOptions {
t.Helper()
envRegion := getEnvRegion(t)
Expand Down
10 changes: 10 additions & 0 deletions provider/test-programs/regress-4760/Pulumi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: regress-4760
runtime:
name: python
options:
virtualenv: venv
description: Provision an SQS queue/DLQ to test RedriveAllowPolicy diffs
config:
pulumi:tags:
value:
pulumi:template: aws-python
24 changes: 24 additions & 0 deletions provider/test-programs/regress-4760/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import pulumi
from pulumi_aws import sqs

dlq = sqs.Queue("demo-dlq")
queue = sqs.Queue(
"demo-queue",
redrive_policy=pulumi.Output.json_dumps(
{
"deadLetterTargetArn": dlq.arn,
"maxReceiveCount": 2,
}
)
)

redrive_allow_policy = sqs.RedriveAllowPolicy(
"demo",
queue_url=dlq.id,
redrive_allow_policy=pulumi.Output.json_dumps(
{
"redrivePermission": "byQueue",
"sourceQueueArns": [queue.arn],
}
)
)
2 changes: 2 additions & 0 deletions provider/test-programs/regress-4760/regress-2534/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pyc
venv/
2 changes: 2 additions & 0 deletions provider/test-programs/regress-4760/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pulumi>=3.0.0,<4.0.0
pulumi-aws>=6.0.2,<7.0.0

0 comments on commit d4ae5a7

Please sign in to comment.