github.com/kyma-project/kyma-environment-broker@v0.0.1/internal/cis/e2e/fake_broker_client.go (about) 1 package e2e 2 3 import ( 4 "fmt" 5 6 "github.com/kyma-project/kyma-environment-broker/internal" 7 "github.com/kyma-project/kyma-environment-broker/internal/storage" 8 ) 9 10 type FakeBrokerClient struct { 11 storage storage.Instances 12 } 13 14 func NewFakeBrokerClient(storage storage.Instances) *FakeBrokerClient { 15 return &FakeBrokerClient{storage: storage} 16 } 17 18 func (fbc *FakeBrokerClient) Deprovision(instance internal.Instance) (string, error) { 19 err := fbc.storage.Delete(instance.InstanceID) 20 if err != nil { 21 return "", fmt.Errorf("fake broker client cannot remove instance with ID: %s", instance.InstanceID) 22 } 23 24 return "061ced07-6225-43ea-b574-03ca78d5b1bc", nil 25 }