From 7d0dca8fc04ff3624eedf3758ed521d837c7fb15 Mon Sep 17 00:00:00 2001 From: slandelle Date: Thu, 25 Apr 2024 00:49:42 +0200 Subject: [PATCH] chore: use gatling-shared-cli --- build.sbt | 3 ++- .../sbt/utils/StartRecorderUtils.scala | 22 ++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/build.sbt b/build.sbt index bad4ee4..23a262b 100644 --- a/build.sbt +++ b/build.sbt @@ -9,7 +9,8 @@ githubPath := "gatling/gatling-sbt-plugin" libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.2.18" % Test, - "io.gatling" % "gatling-enterprise-plugin-commons" % "1.9.1" + "io.gatling" % "gatling-enterprise-plugin-commons" % "1.9.1", + "io.gatling" % "gatling-shared-cli" % "0.0.1" ) scriptedLaunchOpts := { diff --git a/src/main/scala/io/gatling/sbt/utils/StartRecorderUtils.scala b/src/main/scala/io/gatling/sbt/utils/StartRecorderUtils.scala index 295fd42..3463fbc 100644 --- a/src/main/scala/io/gatling/sbt/utils/StartRecorderUtils.scala +++ b/src/main/scala/io/gatling/sbt/utils/StartRecorderUtils.scala @@ -16,6 +16,8 @@ package io.gatling.sbt.utils +import io.gatling.shared.cli.RecorderCliOptions + import sbt.complete.DefaultParsers._ import sbt.complete.Parser @@ -25,22 +27,22 @@ private[gatling] object StartRecorderUtils { * List of all CLI options supported by the Recorder, in their "short" version. */ val shortRecorderOpts = Set( - "sf", - "rf", - "cn", - "pkg", - "fmt" + RecorderCliOptions.SimulationsFolder.abbr, + RecorderCliOptions.ResourcesFolder.abbr, + RecorderCliOptions.ClassName.abbr, + RecorderCliOptions.Package.abbr, + RecorderCliOptions.Format.abbr ) /** * List of all CLI options supported by the Recorder, in their "full" version. */ val fullRecorderOpts = Set( - "simulations-folder", - "resources-folder", - "class-name", - "package", - "format" + RecorderCliOptions.SimulationsFolder.full, + RecorderCliOptions.ResourcesFolder.full, + RecorderCliOptions.ClassName.full, + RecorderCliOptions.Package.full, + RecorderCliOptions.Format.full ) /** Parser matching the help option, in short and full version. */