-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test provisioning process with KIM (#926)
* Test provisioning process with KIM * wip
- Loading branch information
1 parent
68b07de
commit cd80bb0
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,41 @@ func TestProvisioning_HappyPath(t *testing.T) { | |
suite.AssertProvisioningRequest() | ||
} | ||
|
||
func TestProvisioningWithKIM(t *testing.T) { | ||
// this test is used for developing KIM integration. The main reason is to just print the Runtime CR as YAML as a result of a process | ||
|
||
cfg := fixConfig() | ||
cfg.Broker.KimConfig.Enabled = true | ||
cfg.Broker.KimConfig.Plans = []string{"aws", "preview"} | ||
cfg.Broker.KimConfig.DryRun = true | ||
|
||
suite := NewBrokerSuiteTestWithConfig(t, cfg) | ||
defer suite.TearDown() | ||
iid := uuid.New().String() | ||
// when | ||
resp := suite.CallAPI("PUT", fmt.Sprintf("oauth/v2/service_instances/%s?accepts_incomplete=true", iid), | ||
`{ | ||
"service_id": "47c9dcbf-ff30-448e-ab36-d3bad66ba281", | ||
"plan_id": "361c511f-f939-4621-b228-d0fb79a1fe15", | ||
"context": { | ||
"globalaccount_id": "g-account-id", | ||
"subaccount_id": "sub-id", | ||
"user_id": "[email protected]" | ||
}, | ||
"parameters": { | ||
"name": "testing-cluster", | ||
"region": "eu-central-1" | ||
} | ||
}`) | ||
|
||
opID := suite.DecodeOperationID(resp) | ||
|
||
suite.processProvisioningByOperationID(opID) | ||
|
||
// then | ||
suite.WaitForOperationState(opID, domain.Succeeded) | ||
} | ||
|
||
func TestProvisioning_HappyPathAWS(t *testing.T) { | ||
// given | ||
suite := NewBrokerSuiteTest(t) | ||
|