These changes add a new flag to the various `ResourceOptions` types that indicates that a resource should be deleted before it is replaced, even if the provider does not require this behavior. The usual delete-before-replace cascade semantics apply. Fixes #1620.
41 lines
789 B
Go
41 lines
789 B
Go
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
|
|
|
package ints
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/pulumi/pulumi/pkg/testing/integration"
|
|
)
|
|
|
|
// TestDeleteBeforeCreate tests a few different operational modes for
|
|
// replacements done by deleting before creating.
|
|
func TestDeleteBeforeCreate(t *testing.T) {
|
|
integration.ProgramTest(t, &integration.ProgramTestOptions{
|
|
Dir: "step1",
|
|
Dependencies: []string{"@pulumi/pulumi"},
|
|
Quick: true,
|
|
EditDirs: []integration.EditDir{
|
|
{
|
|
Dir: "step2",
|
|
Additive: true,
|
|
},
|
|
{
|
|
Dir: "step3",
|
|
Additive: true,
|
|
},
|
|
{
|
|
Dir: "step4",
|
|
Additive: true,
|
|
},
|
|
{
|
|
Dir: "step5",
|
|
Additive: true,
|
|
},
|
|
{
|
|
Dir: "step6",
|
|
Additive: true,
|
|
},
|
|
},
|
|
})
|
|
}
|