Skip to content

Commit

Permalink
fix(tests/polkadot_js): Use westend-local to run polkadot js test s…
Browse files Browse the repository at this point in the history
…uite (#3052)
  • Loading branch information
EclesioMeloJunior authored Jan 23, 2023
1 parent 650371e commit 2d5ead1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions tests/polkadotjs_test/start_polkadotjs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import (

var polkadotSuite = "polkadot"

// TODO: add test against latest dev runtime
// See /~https://github.com/ChainSafe/gossamer/issues/2705
func TestStartGossamerAndPolkadotAPI(t *testing.T) {
if utils.MODE != polkadotSuite {
t.Log("Going to skip polkadot.js/api suite tests")
Expand Down Expand Up @@ -48,7 +46,7 @@ func TestStartGossamerAndPolkadotAPI(t *testing.T) {
t.Log("starting gossamer for polkadot.js/api tests...")

tomlConfig := config.Default()
tomlConfig.Init.Genesis = libutils.GetDevV3SubstrateGenesisPath(t)
tomlConfig.Init.Genesis = libutils.GetWestendLocalRawGenesisPath(t)
tomlConfig.Core.BABELead = true
tomlConfig.RPC.WS = true
tomlConfig.RPC.Unsafe = true
Expand Down
4 changes: 2 additions & 2 deletions tests/polkadotjs_test/test/test-polkadot.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('Testing polkadot.js/api calls:', function () {
it('call api.runtimeVersion', async function () {
const runtimeVersion = await api.runtimeVersion;
expect(runtimeVersion).to.be.not.null;
expect(runtimeVersion).to.have.property('specName').contains('node')
expect(runtimeVersion).to.have.property('specName').contains('westend');
expect(runtimeVersion).to.have.property('apis').lengthOf.above(10)
});

Expand Down Expand Up @@ -116,7 +116,7 @@ describe('Testing polkadot.js/api calls:', function () {
describe('api system', () => {
it('call api.rpc.system.chain()', async function () {
const chain = await api.rpc.system.chain();
expect(chain).to.contain('Gossamer');
expect(chain).to.contain('Westend')
});

it('call api.rpc.system.properties()', async function () {
Expand Down

0 comments on commit 2d5ead1

Please sign in to comment.