ensure that the tests for forcesvg can be run by inlining JSON

Change-Id: I432025c8c02105f4a47fbdbb52384a6514efb495
This commit is contained in:
Sean Condon 2021-10-21 15:37:11 +01:00
parent 8ad1da90c4
commit 4ceeae7439
6 changed files with 1801 additions and 1794 deletions

View File

@ -45,7 +45,6 @@ ts_library(
# TODO re-enable this test
exclude = [
"lib/layer/backgroundsvg/backgroundsvg.component.spec.ts",
"lib/layer/forcesvg/forcesvg.component.spec.ts",
"lib/layer/forcesvg/visuals/hostnodesvg/hostnodesvg.component.spec.ts",
],
),
@ -147,6 +146,9 @@ genrule(
&& echo '});' >> $@""",
)
# These tests are not run as part of CI because they require a browser to be installed
# Run them locally on your system if you are making a change to any of the TypeScript files
# bazel test //web/gui2-topo-lib:test-not-coverage
karma_web_test(
name = "test-not-coverage", # coverage is to avoid being picked up by 'ot' alias
srcs = [
@ -156,7 +158,7 @@ karma_web_test(
"@npm//:node_modules/zone.js/dist/zone-testing-bundle.js",
"@npm//:node_modules/reflect-metadata/Reflect.js",
],
config_file = "//web/gui2/src/main/webapp:karma.conf.js",
config_file = "//web/gui2/src/main/webapp:karma.conf.js", # Edit this file to set the Browsers needed
tags = ["native"],
runtime_deps = [
"//web/gui2/src/main/webapp:initialize_testbed",

File diff suppressed because it is too large Load Diff

View File

@ -1,165 +0,0 @@
{
"event": "topo2CurrentRegion",
"payload": {
"id": "(root)",
"subregions": [],
"links": [
{
"id": "netconf:127.0.0.1:11002/201~netconf:127.0.0.1:11003/201",
"epA": "netconf:127.0.0.1:11002/201",
"epB": "netconf:127.0.0.1:11003/201",
"type": "UiDeviceLink",
"portA": "201",
"portB": "201",
"rollup": [
{
"id": "netconf:127.0.0.1:11002/201~netconf:127.0.0.1:11003/201",
"epA": "netconf:127.0.0.1:11002/201",
"epB": "netconf:127.0.0.1:11003/201",
"type": "UiDeviceLink",
"portA": "201",
"portB": "201"
}
]
},
{
"id": "netconf:127.0.0.1:11002/202~netconf:127.0.0.1:11003/202",
"epA": "netconf:127.0.0.1:11002/202",
"epB": "netconf:127.0.0.1:11003/202",
"type": "UiDeviceLink",
"portA": "202",
"portB": "202",
"rollup": [
{
"id": "netconf:127.0.0.1:11002/202~netconf:127.0.0.1:11003/202",
"epA": "netconf:127.0.0.1:11002/202",
"epB": "netconf:127.0.0.1:11003/202",
"type": "UiDeviceLink",
"portA": "202",
"portB": "202"
}
]
},
{
"id": "netconf:127.0.0.1:11002/203~netconf:127.0.0.1:11003/203",
"epA": "netconf:127.0.0.1:11002/203",
"epB": "netconf:127.0.0.1:11003/203",
"type": "UiDeviceLink",
"portA": "203",
"portB": "203",
"rollup": [
{
"id": "netconf:127.0.0.1:11002/203~netconf:127.0.0.1:11003/203",
"epA": "netconf:127.0.0.1:11002/203",
"epB": "netconf:127.0.0.1:11003/203",
"type": "UiDeviceLink",
"portA": "203",
"portB": "203"
}
]
},
{
"id": "netconf:127.0.0.1:11002/204~netconf:127.0.0.1:11003/204",
"epA": "netconf:127.0.0.1:11002/204",
"epB": "netconf:127.0.0.1:11003/204",
"type": "UiDeviceLink",
"portA": "204",
"portB": "204",
"rollup": [
{
"id": "netconf:127.0.0.1:11002/204~netconf:127.0.0.1:11003/204",
"epA": "netconf:127.0.0.1:11002/204",
"epB": "netconf:127.0.0.1:11003/204",
"type": "UiDeviceLink",
"portA": "204",
"portB": "204"
}
]
},
{
"id": "netconf:127.0.0.1:11002/205~netconf:127.0.0.1:11003/205",
"epA": "netconf:127.0.0.1:11002/205",
"epB": "netconf:127.0.0.1:11003/205",
"type": "UiDeviceLink",
"portA": "205",
"portB": "205",
"rollup": [
{
"id": "netconf:127.0.0.1:11002/205~netconf:127.0.0.1:11003/205",
"epA": "netconf:127.0.0.1:11002/205",
"epB": "netconf:127.0.0.1:11003/205",
"type": "UiDeviceLink",
"portA": "205",
"portB": "205"
}
]
},
{
"id": "netconf:127.0.0.1:11002/206~netconf:127.0.0.1:11003/206",
"epA": "netconf:127.0.0.1:11002/206",
"epB": "netconf:127.0.0.1:11003/206",
"type": "UiDeviceLink",
"portA": "206",
"portB": "206",
"rollup": [
{
"id": "netconf:127.0.0.1:11002/206~netconf:127.0.0.1:11003/206",
"epA": "netconf:127.0.0.1:11002/206",
"epB": "netconf:127.0.0.1:11003/206",
"type": "UiDeviceLink",
"portA": "206",
"portB": "206"
}
]
}
],
"devices": [
[],
[],
[
{
"id": "netconf:127.0.0.1:11002",
"nodeType": "device",
"type": "terminal_device",
"online": true,
"master": "127.0.0.1",
"layer": "def",
"props": {
"ipaddress": "127.0.0.1",
"protocol": "NETCONF",
"driver": "cassini-ocnos",
"port": "11002",
"name": "cassini2",
"locType": "none"
}
},
{
"id": "netconf:127.0.0.1:11003",
"nodeType": "device",
"type": "terminal_device",
"online": true,
"master": "127.0.0.1",
"layer": "def",
"props": {
"ipaddress": "127.0.0.1",
"protocol": "NETCONF",
"driver": "cassini-ocnos",
"port": "11003",
"name": "cassini1",
"locType": "none"
}
}
]
],
"hosts": [
[],
[],
[]
],
"layerOrder": [
"opt",
"pkt",
"def"
]
}
}

View File

@ -1,380 +0,0 @@
{
"event": "topo2CurrentRegion",
"payload": {
"id": "(root)",
"subregions": [],
"links": [
{
"id": "device:leaf1/1~device:spine1/1",
"epA": "device:leaf1/1",
"epB": "device:spine1/1",
"type": "UiDeviceLink",
"portA": "1",
"portB": "1",
"rollup": [
{
"id": "device:leaf1/1~device:spine1/1",
"epA": "device:leaf1/1",
"epB": "device:spine1/1",
"type": "UiDeviceLink",
"portA": "1",
"portB": "1"
}
]
},
{
"id": "device:leaf2/2~device:spine2/2",
"epA": "device:leaf2/2",
"epB": "device:spine2/2",
"type": "UiDeviceLink",
"portA": "2",
"portB": "2",
"rollup": [
{
"id": "device:leaf2/2~device:spine2/2",
"epA": "device:leaf2/2",
"epB": "device:spine2/2",
"type": "UiDeviceLink",
"portA": "2",
"portB": "2"
}
]
},
{
"id": "00:00:00:00:00:1A/None~device:leaf1/3",
"epA": "00:00:00:00:00:1A/None",
"epB": "device:leaf1",
"type": "UiEdgeLink",
"portB": "3",
"rollup": [
{
"id": "00:00:00:00:00:1A/None~device:leaf1/3",
"epA": "00:00:00:00:00:1A/None",
"epB": "device:leaf1",
"type": "UiEdgeLink",
"portB": "3"
}
]
},
{
"id": "00:00:00:00:00:30/None~device:leaf2/3",
"epA": "00:00:00:00:00:30/None",
"epB": "device:leaf2",
"type": "UiEdgeLink",
"portB": "3",
"rollup": [
{
"id": "00:00:00:00:00:30/None~device:leaf2/3",
"epA": "00:00:00:00:00:30/None",
"epB": "device:leaf2",
"type": "UiEdgeLink",
"portB": "3"
}
]
},
{
"id": "device:leaf1/2~device:spine2/1",
"epA": "device:leaf1/2",
"epB": "device:spine2/1",
"type": "UiDeviceLink",
"portA": "2",
"portB": "1",
"rollup": [
{
"id": "device:leaf1/2~device:spine2/1",
"epA": "device:leaf1/2",
"epB": "device:spine2/1",
"type": "UiDeviceLink",
"portA": "2",
"portB": "1"
}
]
},
{
"id": "device:leaf2/1~device:spine1/2",
"epA": "device:leaf2/1",
"epB": "device:spine1/2",
"type": "UiDeviceLink",
"portA": "1",
"portB": "2",
"rollup": [
{
"id": "device:leaf2/1~device:spine1/2",
"epA": "device:leaf2/1",
"epB": "device:spine1/2",
"type": "UiDeviceLink",
"portA": "1",
"portB": "2"
}
]
},
{
"id": "00:00:00:00:00:20/None~device:leaf1/6",
"epA": "00:00:00:00:00:20/None",
"epB": "device:leaf1",
"type": "UiEdgeLink",
"portB": "6",
"rollup": [
{
"id": "00:00:00:00:00:20/None~device:leaf1/6",
"epA": "00:00:00:00:00:20/None",
"epB": "device:leaf1",
"type": "UiEdgeLink",
"portB": "6"
}
]
},
{
"id": "00:00:00:00:00:1C/None~device:leaf1/5",
"epA": "00:00:00:00:00:1C/None",
"epB": "device:leaf1",
"type": "UiEdgeLink",
"portB": "5",
"rollup": [
{
"id": "00:00:00:00:00:1C/None~device:leaf1/5",
"epA": "00:00:00:00:00:1C/None",
"epB": "device:leaf1",
"type": "UiEdgeLink",
"portB": "5"
}
]
},
{
"id": "00:00:00:00:00:1B/None~device:leaf1/4",
"epA": "00:00:00:00:00:1B/None",
"epB": "device:leaf1",
"type": "UiEdgeLink",
"portB": "4",
"rollup": [
{
"id": "00:00:00:00:00:1B/None~device:leaf1/4",
"epA": "00:00:00:00:00:1B/None",
"epB": "device:leaf1",
"type": "UiEdgeLink",
"portB": "4"
}
]
}
],
"devices": [
[],
[],
[
{
"id": "device:spine1",
"nodeType": "device",
"type": "switch",
"online": true,
"master": "172.24.0.3",
"layer": "def",
"props": {
"managementAddress": "grpc://mininet:50003?device_id=1",
"protocol": "P4Runtime, gNMI, gNOI",
"gridX": "400.0",
"gridY": "400.0",
"driver": "stratum-bmv2",
"name": "device:spine1",
"p4DeviceId": "1",
"locType": "grid"
},
"location": {
"locType": "grid",
"latOrY": 400.0,
"longOrX": 400.0
}
},
{
"id": "device:spine2",
"nodeType": "device",
"type": "switch",
"online": true,
"master": "172.24.0.3",
"layer": "def",
"props": {
"managementAddress": "grpc://mininet:50004?device_id=1",
"protocol": "P4Runtime, gNMI, gNOI",
"gridX": "600.0",
"gridY": "400.0",
"driver": "stratum-bmv2",
"name": "device:spine2",
"p4DeviceId": "1",
"locType": "grid"
},
"location": {
"locType": "grid",
"latOrY": 400.0,
"longOrX": 600.0
}
},
{
"id": "device:leaf2",
"nodeType": "device",
"type": "switch",
"online": true,
"master": "172.24.0.3",
"layer": "def",
"props": {
"managementAddress": "grpc://mininet:50002?device_id=1",
"protocol": "P4Runtime, gNMI, gNOI",
"gridX": "800.0",
"gridY": "600.0",
"driver": "stratum-bmv2",
"name": "device:leaf2",
"p4DeviceId": "1",
"locType": "grid"
},
"location": {
"locType": "grid",
"latOrY": 600.0,
"longOrX": 800.0
}
},
{
"id": "device:leaf1",
"nodeType": "device",
"type": "switch",
"online": true,
"master": "172.24.0.3",
"layer": "def",
"props": {
"managementAddress": "grpc://mininet:50001?device_id=1",
"protocol": "P4Runtime, gNMI, gNOI",
"gridX": "200.0",
"gridY": "600.0",
"driver": "stratum-bmv2",
"name": "device:leaf1",
"p4DeviceId": "1",
"locType": "grid"
},
"location": {
"locType": "grid",
"latOrY": 600.0,
"longOrX": 200.0
}
}
]
],
"hosts": [
[],
[],
[
{
"id": "00:00:00:00:00:30/None",
"nodeType": "host",
"layer": "def",
"ips": [
"2001:2:3::1"
],
"props": {
"gridX": "750.0",
"gridY": "700.0",
"latitude": null,
"name": "h3",
"locType": "grid",
"longitude": null
},
"location": {
"locType": "grid",
"latOrY": 700.0,
"longOrX": 750.0
},
"configured": false
},
{
"id": "00:00:00:00:00:1A/None",
"nodeType": "host",
"layer": "def",
"ips": [
"2001:1:1::a"
],
"props": {
"gridX": "100.0",
"gridY": "700.0",
"latitude": null,
"name": "h1a",
"locType": "grid",
"longitude": null
},
"location": {
"locType": "grid",
"latOrY": 700.0,
"longOrX": 100.0
},
"configured": false
},
{
"id": "00:00:00:00:00:1B/None",
"nodeType": "host",
"layer": "def",
"ips": [
"2001:1:1::b"
],
"props": {
"gridX": "100.0",
"gridY": "800.0",
"latitude": null,
"name": "h1b",
"locType": "grid",
"longitude": null
},
"location": {
"locType": "grid",
"latOrY": 800.0,
"longOrX": 100.0
},
"configured": false
},
{
"id": "00:00:00:00:00:1C/None",
"nodeType": "host",
"layer": "def",
"ips": [
"2001:1:1::c"
],
"props": {
"gridX": "250.0",
"gridY": "800.0",
"latitude": null,
"name": "h1c",
"locType": "grid",
"longitude": null
},
"location": {
"locType": "grid",
"latOrY": 800.0,
"longOrX": 250.0
},
"configured": false
},
{
"id": "00:00:00:00:00:20/None",
"nodeType": "host",
"layer": "def",
"ips": [
"2001:1:2::1"
],
"props": {
"gridX": "400.0",
"gridY": "700.0",
"latitude": null,
"name": "h2",
"locType": "grid",
"longitude": null
},
"location": {
"locType": "grid",
"latOrY": 700.0,
"longOrX": 400.0
},
"configured": false
}
]
],
"layerOrder": [
"opt",
"pkt",
"def"
]
}
}

View File

@ -1,39 +0,0 @@
{
"event": "topo2Highlights",
"payload": {
"devices": [],
"hosts": [],
"links": [
{
"id": "device:leaf2/2~device:spine2/2",
"label": "964.91 Kbps",
"css": "secondary port-traffic-green"
},
{
"id": "device:leaf1/1~device:spine1/1",
"label": "3.92 Mbps",
"css": "secondary port-traffic-yellow"
},
{
"id": "00:00:00:00:00:30/None~device:leaf2/3",
"label": "4.46 Mbps",
"css": "secondary port-traffic-yellow"
},
{
"id": "device:leaf2/1~device:spine1/2",
"label": "3.53 Mbps",
"css": "secondary port-traffic-yellow"
},
{
"id": "device:leaf1/2~device:spine2/1",
"label": "1.06 Mbps",
"css": "secondary port-traffic-yellow"
},
{
"id": "00:00:00:00:00:20/None~device:leaf1/6",
"label": "4.98 Mbps",
"css": "secondary port-traffic-yellow"
}
]
}
}