diff --git a/licensing/src/main/scala/app/softnetwork/elastic/licensing/package.scala b/licensing/src/main/scala/app/softnetwork/elastic/licensing/package.scala index 9b0813fb..ccb23f6a 100644 --- a/licensing/src/main/scala/app/softnetwork/elastic/licensing/package.scala +++ b/licensing/src/main/scala/app/softnetwork/elastic/licensing/package.scala @@ -132,7 +132,8 @@ package object licensing { val Community: LicenseKey = LicenseKey( id = "community", licenseType = LicenseType.Community, - features = Set(Feature.MaterializedViews, Feature.JdbcDriver, Feature.FlightSql), + features = + Set(Feature.MaterializedViews, Feature.JdbcDriver, Feature.FlightSql, Feature.Federation), expiresAt = None, quota = Some(Quota.Community) ) @@ -142,7 +143,8 @@ package object licensing { maxMaterializedViews: Option[Int], // None = unlimited maxQueryResults: Option[Int], // None = unlimited maxConcurrentQueries: Option[Int], - maxClusters: Option[Int] = Some(0) // None = unlimited + maxClusters: Option[Int] = Some(0), // None = unlimited + maxJoins: Option[Int] = Some(0) // None = unlimited ) object Quota { @@ -150,21 +152,24 @@ package object licensing { maxMaterializedViews = Some(3), maxQueryResults = Some(10000), maxConcurrentQueries = Some(5), - maxClusters = Some(0) + maxClusters = Some(1), + maxJoins = Some(1) ) val Pro: Quota = Quota( maxMaterializedViews = Some(50), maxQueryResults = Some(1000000), maxConcurrentQueries = Some(50), - maxClusters = Some(5) + maxClusters = Some(5), + maxJoins = Some(5) ) val Enterprise: Quota = Quota( maxMaterializedViews = None, // Unlimited maxQueryResults = None, maxConcurrentQueries = None, - maxClusters = None + maxClusters = None, + maxJoins = None ) } diff --git a/licensing/src/test/scala/app/softnetwork/elastic/licensing/LicenseManagerSpec.scala b/licensing/src/test/scala/app/softnetwork/elastic/licensing/LicenseManagerSpec.scala index 87f4f92c..edfde6ff 100644 --- a/licensing/src/test/scala/app/softnetwork/elastic/licensing/LicenseManagerSpec.scala +++ b/licensing/src/test/scala/app/softnetwork/elastic/licensing/LicenseManagerSpec.scala @@ -35,8 +35,8 @@ class LicenseManagerSpec extends AnyFlatSpec with Matchers { manager.hasFeature(Feature.FlightSql) shouldBe true } - it should "not include Federation" in { - manager.hasFeature(Feature.Federation) shouldBe false + it should "include Federation" in { + manager.hasFeature(Feature.Federation) shouldBe true } it should "not include OdbcDriver" in { diff --git a/licensing/src/test/scala/app/softnetwork/elastic/licensing/QuotaSpec.scala b/licensing/src/test/scala/app/softnetwork/elastic/licensing/QuotaSpec.scala index 38bf5066..45f6ac5c 100644 --- a/licensing/src/test/scala/app/softnetwork/elastic/licensing/QuotaSpec.scala +++ b/licensing/src/test/scala/app/softnetwork/elastic/licensing/QuotaSpec.scala @@ -21,8 +21,12 @@ import org.scalatest.matchers.should.Matchers class QuotaSpec extends AnyFlatSpec with Matchers { - "Quota.Community" should "have maxClusters = Some(0)" in { - Quota.Community.maxClusters shouldBe Some(0) + "Quota.Community" should "have maxClusters = Some(1)" in { + Quota.Community.maxClusters shouldBe Some(1) + } + + it should "have maxJoins = Some(1)" in { + Quota.Community.maxJoins shouldBe Some(1) } it should "have maxMaterializedViews = Some(3)" in { @@ -41,6 +45,10 @@ class QuotaSpec extends AnyFlatSpec with Matchers { Quota.Pro.maxClusters shouldBe Some(5) } + it should "have maxJoins = Some(5)" in { + Quota.Pro.maxJoins shouldBe Some(5) + } + it should "have maxMaterializedViews = Some(50)" in { Quota.Pro.maxMaterializedViews shouldBe Some(50) } @@ -57,6 +65,10 @@ class QuotaSpec extends AnyFlatSpec with Matchers { Quota.Enterprise.maxClusters shouldBe None } + it should "have maxJoins = None (unlimited)" in { + Quota.Enterprise.maxJoins shouldBe None + } + it should "have maxMaterializedViews = None (unlimited)" in { Quota.Enterprise.maxMaterializedViews shouldBe None } @@ -76,5 +88,6 @@ class QuotaSpec extends AnyFlatSpec with Matchers { maxConcurrentQueries = Some(1) ) quota.maxClusters shouldBe Some(0) + quota.maxJoins shouldBe Some(0) } }