Skip to content

Commit

Permalink
Fix names of stories (#362)
Browse files Browse the repository at this point in the history
Signed-off-by: alexstroke <111361420+astrokov7@users.noreply.github.com>
  • Loading branch information
AlexStroke authored Aug 15, 2023
1 parent bdb8489 commit 027c168
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ class InstructionsTest : IrohaTest<Iroha2Client>() {
@Test
@WithIroha([DefaultGenesis::class])
@Feature("Accounts")
@Story("Account set key value pair")
@Story("Account sets key value pair")
@Permission("can_set_key_value_in_user_asset")
@SdkTestId("set_key_value_pair_for_another_account_asset_definition")
fun `grant access to asset key-value and then revoke`(): Unit = runBlocking {
Expand Down Expand Up @@ -487,7 +487,7 @@ class InstructionsTest : IrohaTest<Iroha2Client>() {
@Test
@WithIroha([AliceHas100XorAndPermissionToBurn::class])
@Feature("Assets")
@Story("Account burn an asset")
@Story("Account burns an asset")
@Permission("no_permission_required")
@SdkTestId("burn_asset_for_account_in_same_domain")
fun `burn asset`(): Unit = runBlocking {
Expand All @@ -508,7 +508,7 @@ class InstructionsTest : IrohaTest<Iroha2Client>() {
@Test
@WithIroha([DefaultGenesis::class])
@Feature("Assets")
@Story("Account burn an asset")
@Story("Account burns an asset")
@Permission("can_burn_assets_with_definition")
@SdkTestId("burn_other_user_asset")
fun `burn other user asset`(): Unit = runBlocking {
Expand All @@ -533,7 +533,7 @@ class InstructionsTest : IrohaTest<Iroha2Client>() {
@Test
@WithIroha([AliceAndBobHasPermissionToMintPublicKeys::class])
@Feature("Accounts")
@Story("Account burn a public key")
@Story("Account burns a public key")
@Permission("no_permission_required")
@SdkTestId("burn_one_of_several_public_keys")
fun `burn public key`(): Unit = runBlocking {
Expand Down Expand Up @@ -787,9 +787,9 @@ class InstructionsTest : IrohaTest<Iroha2Client>() {
@Feature("Assets")
@Story("Account registers an asset definition")
@SdkTestId("register_fixed_asset_definition")
@Story("Account mint an asset")
@Story("Account mints an asset")
@SdkTestId("mint_fixed_asset")
@Story("Account burn an asset")
@Story("Account burns an asset")
@Permission("no_permission_required")
@SdkTestId("burn_fixed_asset")
fun `check assets with type Fixed are properly minted and burned`(): Unit = runBlocking {
Expand Down Expand Up @@ -895,7 +895,7 @@ class InstructionsTest : IrohaTest<Iroha2Client>() {
@SdkTestId("register_role")
@SdkTestId("attach_permissions_to_role")
@SdkTestId("grant_role_to_account")
@Story("Account set key value pair")
@Story("Account sets key value pair")
@Permission("can_set_key_value_in_user_asset")
@Feature("Accounts")
@SdkTestId("set_key_value_in_foreign_asset_after_granting_role")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ class QueriesTest : IrohaTest<Iroha2Client>() {
@WithIroha([NewDomain::class])
@Feature("Domains")
@Query("FindAllDomainsWithFilter")
@Story("Domain queries all domains with filter")
@Story("Account queries all domains with filter")
@SdkTestId("find_all_domains_with_filter")
fun `find all domains with filter`(): Unit = runBlocking {
val filter = QueryFilters.startsWith("wonder")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ import org.testcontainers.shaded.org.apache.commons.lang3.RandomStringUtils
*/
open class DefaultGenesis : Genesis(rawGenesisBlock())

open class AliceCanUpgradeValidator : Genesis(
rawGenesisBlock(
Instructions.grantPermissionToken(
Permissions.CanUpgradeValidator,
mapOf(),
ALICE_ACCOUNT_ID,
),
),
)

open class AliceCanUnregisterAnyPeer : Genesis(
rawGenesisBlock(
Instructions.grantPermissionToken(
Expand Down Expand Up @@ -323,6 +333,7 @@ fun rawGenesisBlock(vararg isi: InstructionBox) = RawGenesisBlock(
Instructions.registerPermissionToken(Permissions.CanTransferUserAssetsToken, IdKey.AssetId),
Instructions.registerPermissionToken(Permissions.CanMintUserPublicKeys, IdKey.AccountId),
Instructions.registerPermissionToken(Permissions.CanUnregisterAnyPeer),
Instructions.registerPermissionToken(Permissions.CanUpgradeValidator),
*isi,
).let { listOf(it) },
Genesis.validatorMode,
Expand Down

0 comments on commit 027c168

Please sign in to comment.