Ziti edge types_test.go

I was searching through the go SDK for TLS examples, and found the following code in the file ziti/edge/types_test.go

I would be curious to know what this does... is it some type of testing harness?

"data":{"_links":{"self":{"href":"./sessions/a7dde565-dec8-4188-90e5-42f5d33bf5a6"}},
29 "edgeRouters":[
30: {"hostname":"hermes-host.ziti.netfoundry.io","name":"hermes","urls":{"tls":"tls://hermes-host.ziti.netfoundry.io:3022"}}],
31 "id":"a7dde565-dec8-4188-90e5-42f5d33bf5a6","token":"75d9aa68-dde3-4243-a062-50fab347b781"}}
32 `
..
42 edgeRouters[0].Hostname = "hermes-host.ziti.netfoundry.io"
43 edgeRouters[0].Urls = map[string]string{
44: "tls": "tls://hermes-host.ziti.netfoundry.io:3022",
45 }

if a file ends in _test.go - it’s a test. so yes. that’s some test code

1 Like