You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: airbyte-commons-entitlements/src/main/kotlin/io/airbyte/commons/entitlements/StiggCloudEntitlementClient.kt
+1-8Lines changed: 1 addition & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -36,15 +36,8 @@ internal class StiggCloudEntitlementClient(
36
36
organizationId:OrganizationId,
37
37
plan:EntitlementPlan,
38
38
) {
39
-
val org =
40
-
organizationService
41
-
.getOrganization(organizationId.value)
42
-
.orElseThrow {
43
-
IllegalStateException("Organization $organizationId not found; could not add to plan $plan")
44
-
} ?:throwIllegalStateException("getOrganization() returned null for $organizationId; could not add to plan $plan")
Copy file name to clipboardExpand all lines: airbyte-commons-entitlements/src/main/kotlin/io/airbyte/commons/entitlements/StiggEnterpriseEntitlementClient.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ class StiggEnterpriseEntitlementClient(
40
40
.entitlements(
41
41
OfflineEntitlements
42
42
.builder()
43
-
.customers(mapOf(smeOrgId.toString() to entitlements))
43
+
.customers(mapOf(smeOrgId.value.toString() to entitlements))
Copy file name to clipboardExpand all lines: airbyte-commons-entitlements/src/test/kotlin/io/airbyte/commons/entitlements/StiggCloudEntitlementClientTest.kt
+37-39Lines changed: 37 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -80,77 +80,60 @@ internal class StiggCloudEntitlementClientTest {
80
80
}
81
81
82
82
@Test
83
-
fun`addOrganization with no org throws`() {
84
-
val stigg = mockk<StiggWrapper>()
83
+
fun`addOrganization calls validatePlanChange and provisionCustomer`() {
84
+
val stigg = mockk<StiggWrapper>(relaxed =true)
85
85
val client =StiggCloudEntitlementClient(stigg, orgService)
86
86
val plan =EntitlementPlan.STANDARD
87
87
88
-
every { orgService.getOrganization(org1.value) } returns Optional.empty()
88
+
every { stigg.getPlans(org1) } returns emptyList()
0 commit comments