diff --git a/ledger/ledger-runner-common/src/main/scala/com/daml/ledger/runner/common/Config.scala b/ledger/ledger-runner-common/src/main/scala/com/daml/ledger/runner/common/Config.scala index 2bc08bdd651..912cf185476 100644 --- a/ledger/ledger-runner-common/src/main/scala/com/daml/ledger/runner/common/Config.scala +++ b/ledger/ledger-runner-common/src/main/scala/com/daml/ledger/runner/common/Config.scala @@ -656,7 +656,7 @@ object Config { config.withUserManagementConfig(_.copy(maxCacheSize = value)) ) - opt[Int]("max-users-page-size") + opt[Int]("user-management-max-users-page-size") .optional() .text( s"Maximum number of users that the server can return in a single response. " + @@ -670,7 +670,9 @@ object Config { if (v == 0 || v >= 100) { success } else { - failure(s"max-users-page-size must be either 0 or greater than 99, was: $v") + failure( + s"user-management-max-users-page-size must be either 0 or greater than 99, was: $v" + ) } }) diff --git a/ledger/ledger-runner-common/src/test/scala/com/daml/ledger/runner/common/ConfigSpec.scala b/ledger/ledger-runner-common/src/test/scala/com/daml/ledger/runner/common/ConfigSpec.scala index 0aedbc1d45e..8a40e8c788d 100644 --- a/ledger/ledger-runner-common/src/test/scala/com/daml/ledger/runner/common/ConfigSpec.scala +++ b/ledger/ledger-runner-common/src/test/scala/com/daml/ledger/runner/common/ConfigSpec.scala @@ -315,37 +315,37 @@ final class ConfigSpec ).value.userManagementConfig.cacheExpiryAfterWriteInSeconds shouldBe 123 } - it should "handle '--max-users-page-size' flag correctly" in { + it should "handle '--user-management-max-users-page-size' flag correctly" in { // missing value configParserSimple( - Seq("--max-users-page-size") + Seq("--user-management-max-users-page-size") ) shouldBe None // default configParserSimple().value.userManagementConfig.maxUsersPageSize shouldBe 1000 // custom value configParserSimple( Seq( - "--max-users-page-size", + "--user-management-max-users-page-size", "123", ) ).value.userManagementConfig.maxUsersPageSize shouldBe 123 // values in range [1, 99] are disallowed checkOptionFail( Array( - "--max-users-page-size", + "--user-management-max-users-page-size", "1", ) ) checkOptionFail( Array( - "--max-users-page-size", + "--user-management-max-users-page-size", "99", ) ) // negative values are disallowed checkOptionFail( Array( - "--max-users-page-size", + "--user-management-max-users-page-size", "-1", ) ) diff --git a/ledger/sandbox-common/src/main/scala/platform/sandbox/cli/CommonCliBase.scala b/ledger/sandbox-common/src/main/scala/platform/sandbox/cli/CommonCliBase.scala index f1f7f637557..b72db33d013 100644 --- a/ledger/sandbox-common/src/main/scala/platform/sandbox/cli/CommonCliBase.scala +++ b/ledger/sandbox-common/src/main/scala/platform/sandbox/cli/CommonCliBase.scala @@ -409,7 +409,7 @@ class CommonCliBase(name: LedgerName) { config.withUserManagementConfig(_.copy(maxCacheSize = value)) ) - opt[Int]("max-users-page-size") + opt[Int]("user-management-max-users-page-size") .optional() .text( s"Maximum number of users that the server can return in a single response. " + @@ -423,7 +423,9 @@ class CommonCliBase(name: LedgerName) { if (v == 0 || v >= 100) { success } else { - failure(s"max-users-page-size must be either 0 or greater than 99, was: $v") + failure( + s"user-management-max-users-page-size must be either 0 or greater than 99, was: $v" + ) } }) diff --git a/ledger/sandbox-common/src/test/lib/scala/platform/sandbox/cli/CommonCliSpecBase.scala b/ledger/sandbox-common/src/test/lib/scala/platform/sandbox/cli/CommonCliSpecBase.scala index 6ee5403cfb3..3e6b494aed2 100644 --- a/ledger/sandbox-common/src/test/lib/scala/platform/sandbox/cli/CommonCliSpecBase.scala +++ b/ledger/sandbox-common/src/test/lib/scala/platform/sandbox/cli/CommonCliSpecBase.scala @@ -411,10 +411,10 @@ abstract class CommonCliSpecBase( ) } - "handle '--max-users-page-size' flag correctly" in { + "handle '--user-management-max-users-page-size' flag correctly" in { // missing value checkOptionFail( - Array("--max-users-page-size") + Array("--user-management-max-users-page-size") ) // default checkOption( @@ -424,7 +424,7 @@ abstract class CommonCliSpecBase( // custom value checkOption( Array( - "--max-users-page-size", + "--user-management-max-users-page-size", "123", ), _.withUserManagementConfig(_.copy(maxUsersPageSize = 123)), @@ -432,20 +432,20 @@ abstract class CommonCliSpecBase( // values in range [1, 99] are disallowed checkOptionFail( Array( - "--max-users-page-size", + "--user-management-max-users-page-size", "1", ) ) checkOptionFail( Array( - "--max-users-page-size", + "--user-management-max-users-page-size", "99", ) ) // negative values are disallowed checkOptionFail( Array( - "--max-users-page-size", + "--user-management-max-users-page-size", "-1", ) )