Skip to content

Commit

Permalink
test(e2e): replace tests pointing to deprecated pallets (#1363)
Browse files Browse the repository at this point in the history
* test(e2e): replaced tests of deprecated pallets

* fix typos in methods names
  • Loading branch information
Imod7 authored Dec 1, 2023
1 parent ecd1518 commit 2a38b2e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
20 changes: 10 additions & 10 deletions e2e-tests/latest/endpoints/polkadot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// Copyright 2017-2023 Parity Technologies (UK) Ltd.
// This file is part of Substrate API Sidecar.
//
// Substrate API Sidecar is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -146,27 +146,27 @@ export const polkadot: IConfig = {
queryParams: ['at={blockId}'],
},
'/pallets/{palletId}/consts': {
path: '/pallets/democracy/consts',
path: '/pallets/MessageQueue/consts',
queryParams: ['at={blockId}'],
},
'/pallets/{palletId}/consts?onlyIds=true': {
path: '/pallets/14/consts',
path: '/pallets/100/consts',
queryParams: ['at={blockId}'],
},
'/pallets/{palletId}/consts/{constItemId}': {
path: '/pallets/democracy/consts/EnactmentPeriod',
path: '/pallets/MessageQueue/consts/ServiceWeight',
queryParams: ['at={blockId}'],
},
'/pallets/{palletId}/dispatchables': {
path: '/pallets/democracy/dispatchables',
path: '/pallets/XcmPallet/dispatchables',
queryParams: [],
},
'/pallets/{palletId}/dispatchables?onlyIds=true': {
path: '/pallets/14/dispatchables',
path: '/pallets/99/dispatchables',
queryParams: [],
},
'/pallets/{palletId}/dispatchables/{dispatchableItemId}': {
path: '/pallets/democracy/dispatchables/vote',
path: '/pallets/XcmPallet/dispatchables/limitedTeleportAssets',
queryParams: [],
},
'/pallets/{palletId}/dispatchables/{dispatchableItemIdWithMultipleWordName}': {
Expand All @@ -178,19 +178,19 @@ export const polkadot: IConfig = {
queryParams: ['at={blockId}'],
},
'/pallets/{palletId}/errors?onlyIds=true': {
path: '/pallets/17/errors',
path: '/pallets/34/errors',
queryParams: ['at={blockId}'],
},
'/pallets/{palletId}/errors/{errorItemId}': {
path: '/pallets/democracy/errors/ValueLow',
path: '/pallets/crowdloan/errors/VrfDelayInProgress',
queryParams: ['at={blockId}'],
},
'/pallets/{palletId}/events': {
path: '/pallets/balances/events',
queryParams: ['at={blockId}'],
},
'/pallets/{palletId}/events/{eventItemId}': {
path: '/pallets/democracy/events/Proposed',
path: '/pallets/auctions/events/ReserveConfiscated',
queryParams: ['at={blockId}', 'metadata=true'],
},
'/pallets/nominationPoools/info': {
Expand Down
6 changes: 3 additions & 3 deletions src/services/pallets/PalletsConstantsService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// Copyright 2017-2023 Parity Technologies (UK) Ltd.
// This file is part of Substrate API Sidecar.
//
// Substrate API Sidecar is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -42,8 +42,8 @@ export class PalletsConstantsService extends AbstractPalletsService {

const [palletMeta, palletMetaIdx] = this.findPalletMeta(palletMetadata, palletId, metadataFieldType);

// Even if `constantItemMeta` is not used, we call this function to ensure it exists. The side effects
// of the constant item not existing are that `findConstantItemMeta` will throw.
// Even if `constantItemMetadata` is not used, we call this function to ensure it exists. The side effects
// of the constant item not existing are that `getConstItemMeta` will throw.
const constantItemMetadata = this.findPalletFieldItemMeta(
historicApi,
palletMeta,
Expand Down
4 changes: 2 additions & 2 deletions src/services/pallets/PalletsDispatchablesService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export class PalletsDispatchablesService extends AbstractPalletsService {

const [palletMeta, palletMetaIdx] = this.findPalletMeta(palletMetadata, palletId, metadataFieldType);

// Even if `dispatchableItemMeta` is not used, we call this function to ensure it exists. The side effects
// of the dispatchable item not existing are that `findPalletFieldItemMeta` will throw.
// Even if `dispatchableItemMetadata` is not used, we call this function to ensure it exists. The side effects
// of the dispatchable item not existing are that `getDispatchablesItemMeta` will throw.
const dispatchableItemMetadata = this.findPalletFieldItemMeta(
historicApi,
palletMeta,
Expand Down
4 changes: 2 additions & 2 deletions src/services/pallets/PalletsErrorsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export class PalletsErrorsService extends AbstractPalletsService {

const [palletMeta, palletMetaIdx] = this.findPalletMeta(palletMetadata, palletId, metadataFieldType);

// Even if `errorItemMeta` is not used, we call this function to ensure it exists. The side effects
// of the error item not existing are that `findErrorItemMeta` will throw.
// Even if `errorItemMetadata` is not used, we call this function to ensure it exists. The side effects
// of the error item not existing are that `getErrorItemMeta` will throw.
const errorItemMetadata = this.findPalletFieldItemMeta(
historicApi,
palletMeta,
Expand Down
6 changes: 3 additions & 3 deletions src/services/pallets/PalletsEventsService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// Copyright 2017-2023 Parity Technologies (UK) Ltd.
// This file is part of Substrate API Sidecar.
//
// Substrate API Sidecar is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -44,8 +44,8 @@ export class PalletsEventsService extends AbstractPalletsService {

const [palletMeta, palletMetaIdx] = this.findPalletMeta(palletMetadata, palletId, metadataFieldType);

// Even if `eventItemMeta` is not used, we call this function to ensure it exists. The side effects
// of the event item not existing are that `findPalletFieldItemMeta` will throw.
// Even if `eventItemMetadata` is not used, we call this function to ensure it exists. The side effects
// of the event item not existing are that `getEventItemMeta` will throw.
const eventItemMetadata = this.findPalletFieldItemMeta(
historicApi,
palletMeta,
Expand Down
4 changes: 2 additions & 2 deletions src/services/pallets/PalletsStorageService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// Copyright 2017-2023 Parity Technologies (UK) Ltd.
// This file is part of Substrate API Sidecar.
//
// Substrate API Sidecar is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -45,7 +45,7 @@ export class PalletsStorageService extends AbstractPalletsService {
const palletName = stringCamelCase(palletMeta.name);

// Even if `storageItemMeta` is not used, we call this function to ensure it exists. The side effects
// of the storage item not existing are that `findPalletItemMeta` will throw.
// of the storage item not existing are that `getStorageItemMeta` will throw.
const storageItemMeta = this.findPalletFieldItemMeta(
historicApi,
palletMeta,
Expand Down

0 comments on commit 2a38b2e

Please sign in to comment.