* Protobuf changes to record dependencies for read resources * Add a number of tests for read resources, especially around replacement * Place read resources in the snapshot with "external" bit set Fixes pulumi/pulumi#1521. This commit introduces two new step ops: Read and ReadReplacement. The engine generates Read and ReadReplacement steps when servicing ReadResource RPC calls from the language host. * Fix an omission of OpReadReplace from the step list * Rebase against master * Transition to use V2 Resources by default * Add a semantic "relinquish" operation to the engine If the engine observes that a resource is read and also that the resource exists in the snapshot as a non-external resource, it will not delete the resource if the IDs of the old and new resources match. * Typo fix * CR: add missing comments, DeserializeDeployment -> DeserializeDeploymentV2, ID check
29 lines
578 B
Go
29 lines
578 B
Go
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
|
|
|
package ints
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/pulumi/pulumi/pkg/testing/integration"
|
|
)
|
|
|
|
// Test that the engine tolerates two deletions of the same URN in the same plan.
|
|
func TestReadDBR(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,
|
|
},
|
|
},
|
|
})
|
|
}
|