From 350c25c941cc6d7d8b8d3100b2320bcec2258139 Mon Sep 17 00:00:00 2001 From: zwiterrion Date: Fri, 10 Jan 2025 11:10:59 +0100 Subject: [PATCH] cleanup --- otoroshi/test/Suites.scala | 8 ++++---- otoroshi/test/functional/ApiKeysSpec.scala | 22 +++------------------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/otoroshi/test/Suites.scala b/otoroshi/test/Suites.scala index 3fe0c7380..d7044b2d2 100644 --- a/otoroshi/test/Suites.scala +++ b/otoroshi/test/Suites.scala @@ -184,7 +184,7 @@ class GreenScoreTest new GreenScoreTestSpec("GreenScore", Configurations.InMemoryConfiguration) ) -class ApiKeysTest - extends Suites( - new ApiKeysSpec("ApiKeysSpec", Configurations.InMemoryConfiguration) - ) +//class ApiKeysTest +// extends Suites( +// new ApiKeysSpec("ApiKeysSpec", Configurations.InMemoryConfiguration) +// ) diff --git a/otoroshi/test/functional/ApiKeysSpec.scala b/otoroshi/test/functional/ApiKeysSpec.scala index bc7f7c890..02e608990 100644 --- a/otoroshi/test/functional/ApiKeysSpec.scala +++ b/otoroshi/test/functional/ApiKeysSpec.scala @@ -1,17 +1,15 @@ package functional -import java.util.Base64 -import java.util.concurrent.atomic.AtomicInteger - import akka.actor.ActorSystem import com.auth0.jwt.JWT import com.auth0.jwt.algorithms.Algorithm import com.typesafe.config.ConfigFactory import otoroshi.models.{ApiKey, ServiceDescriptor, ServiceGroupIdentifier, Target} -import org.scalatest.concurrent.IntegrationPatience -import org.scalatestplus.play.PlaySpec import play.api.Configuration +import java.util.Base64 +import java.util.concurrent.atomic.AtomicInteger + class ApiKeysSpec(name: String, configurationSpec: => Configuration) extends OtoroshiSpec { lazy val serviceHost = "auth.oto.tools" @@ -407,20 +405,6 @@ class ApiKeysSpec(name: String, configurationSpec: => Configuration) extends Oto deleteOtoroshiService(service).futureValue } - "prevent to many calls per window" in { - val testApiKey = new ApiKey( - clientId = "1234", - clientSecret = "1234567890", - clientName = "test apikey", - authorizedEntities = Seq(ServiceGroupIdentifier("default")), - enabled = true, - throttlingQuota = 10, - dailyQuota = 10, - monthlyQuota = 100, - metadata = Map.empty - ) - } - "stop servers" in { basicTestServer1.stop() system.terminate()