Check urls as part of tests (#5485)
This commit is contained in:
parent
59868c70e5
commit
7e20c2e75b
11
.github/workflows/lint-chain-urls.yml
vendored
11
.github/workflows/lint-chain-urls.yml
vendored
@ -1,11 +0,0 @@
|
||||
name: Chain
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
urls:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
run: |
|
||||
yarn install --immutable | grep -v 'YN0013'
|
||||
yarn ci:chainUrls
|
||||
@ -51,7 +51,6 @@
|
||||
"packElectron": "yarn build:release:electron && yarn clean:electronRelease && electron-builder build -mwl",
|
||||
"docs": "echo \"skipping docs\"",
|
||||
"ci:chainTypes": "polkadot-dev-run-test --silent packages/apps-config/src/ciChainTypes",
|
||||
"ci:chainUrls": "polkadot-dev-run-test --silent packages/apps-config/src/ciChainUrls",
|
||||
"clean": "polkadot-dev-clean-build",
|
||||
"clean:electronBuild": "cd packages/apps-electron && polkadot-dev-clean-build",
|
||||
"clean:electronRelease": "cd packages/apps-electron && rm -rf release",
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
import { assert, isString } from '@polkadot/util';
|
||||
|
||||
import { createWsEndpoints } from './endpoints';
|
||||
import { createWsEndpoints } from '.';
|
||||
|
||||
interface Endpoint {
|
||||
name: string;
|
||||
@ -17,7 +17,7 @@ const endpoints = createWsEndpoints((k: string, v?: string) => v || k, true)
|
||||
.map((o): Partial<Endpoint> => ({ name: o.text as string, ws: o.value as string }))
|
||||
.filter((v): v is Endpoint => !!v.ws);
|
||||
|
||||
describe('check configured chain urls', (): void => {
|
||||
describe('urls are all valid', (): void => {
|
||||
endpoints.forEach(({ name, ws }) =>
|
||||
it(`${name} @ ${ws}`, (): void => {
|
||||
assert(ws.startsWith('wss://'), `Expected ${ws} endpoint to start with wss:// `);
|
||||
Loading…
Reference in New Issue
Block a user