Check urls as part of tests (#5485)

This commit is contained in:
Jaco 2021-06-08 06:24:45 +03:00 committed by GitHub
parent 59868c70e5
commit 7e20c2e75b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 14 deletions

View File

@ -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

View File

@ -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",

View File

@ -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:// `);