|
| 1 | +@setupApplicationTest |
| 2 | +Feature: dc / services / instances / show: Proxy Info tab |
| 3 | + Background: |
| 4 | + Given 1 datacenter model with the value "dc1" |
| 5 | + Scenario: A Service instance without a Proxy does not display Proxy Info tab |
| 6 | + Given 1 proxy model from yaml |
| 7 | + --- |
| 8 | + - ServiceProxy: |
| 9 | + DestinationServiceName: service-1 |
| 10 | + DestinationServiceID: ~ |
| 11 | + --- |
| 12 | + When I visit the instance page for yaml |
| 13 | + --- |
| 14 | + dc: dc1 |
| 15 | + service: service-0 |
| 16 | + node: node-0 |
| 17 | + id: service-0-with-id |
| 18 | + --- |
| 19 | + Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/health-checks |
| 20 | + And I don't see proxyInfo on the tabs |
| 21 | + Scenario: A Service instance with a Proxy displays Proxy Info tab |
| 22 | + When I visit the instance page for yaml |
| 23 | + --- |
| 24 | + dc: dc1 |
| 25 | + service: service-0 |
| 26 | + node: node-0 |
| 27 | + id: service-0-with-id |
| 28 | + --- |
| 29 | + Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/health-checks |
| 30 | + And I see proxyInfo on the tabs |
| 31 | + |
| 32 | + When I click proxyInfo on the tabs |
| 33 | + |
| 34 | + Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy-info |
| 35 | + And I see proxyInfoIsSelected on the tabs |
| 36 | + Scenario: A Proxy with health checks, upstreams, and exposed paths displays all info |
| 37 | + Given 2 instance models from yaml |
| 38 | + --- |
| 39 | + - Service: |
| 40 | + ID: service-0-with-id |
| 41 | + Kind: consul |
| 42 | + Node: |
| 43 | + Node: node-0 |
| 44 | + - Service: |
| 45 | + ID: service-0-with-id-proxy |
| 46 | + Kind: connect-proxy |
| 47 | + Proxy: |
| 48 | + DestinationServiceName: service-0 |
| 49 | + Expose: |
| 50 | + Checks: false |
| 51 | + Paths: |
| 52 | + - Path: /grpc-metrics |
| 53 | + Protocol: grpc |
| 54 | + LocalPathPort: 8081 |
| 55 | + ListenerPort: 8080 |
| 56 | + - Path: /http-metrics |
| 57 | + Protocol: http |
| 58 | + LocalPathPort: 8082 |
| 59 | + ListenerPort: 8083 |
| 60 | + - Path: /http-metrics-2 |
| 61 | + Protocol: http |
| 62 | + LocalPathPort: 8083 |
| 63 | + ListenerPort: 8084 |
| 64 | + Upstreams: |
| 65 | + - DestinationType: service |
| 66 | + DestinationName: kenia |
| 67 | + DestinationNamespace: default |
| 68 | + LocalBindAddress: 127.0.0.1 |
| 69 | + LocalBindPort: 1111 |
| 70 | + - DestinationType: prepared_query |
| 71 | + DestinationName: service-3 |
| 72 | + LocalBindAddress: 127.0.0.1 |
| 73 | + LocalBindPort: 1112 |
| 74 | + Node: |
| 75 | + Node: node-0 |
| 76 | + Checks: |
| 77 | + - Name: Service check |
| 78 | + ServiceID: service-0-proxy |
| 79 | + Output: Output of check |
| 80 | + Status: passing |
| 81 | + - Name: Service check |
| 82 | + ServiceID: service-0-proxy |
| 83 | + Output: Output of check |
| 84 | + Status: warning |
| 85 | + - Name: Service check |
| 86 | + Type: http |
| 87 | + ServiceID: service-0-proxy |
| 88 | + Output: Output of check |
| 89 | + Status: critical |
| 90 | + - Name: Node check |
| 91 | + ServiceID: "" |
| 92 | + Output: Output of check |
| 93 | + Status: passing |
| 94 | + - Name: Node check |
| 95 | + ServiceID: "" |
| 96 | + Output: Output of check |
| 97 | + Status: warning |
| 98 | + - Name: Node check |
| 99 | + ServiceID: "" |
| 100 | + Output: Output of check |
| 101 | + Status: critical |
| 102 | + --- |
| 103 | + When I visit the instance page for yaml |
| 104 | + --- |
| 105 | + dc: dc1 |
| 106 | + service: service-0 |
| 107 | + node: node-0 |
| 108 | + id: service-0-with-id |
| 109 | + --- |
| 110 | + Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/health-checks |
| 111 | + And I see proxyInfo on the tabs |
| 112 | + |
| 113 | + When I click proxyInfo on the tabs |
| 114 | + Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy-info |
| 115 | + And pause for 3000 |
| 116 | + |
| 117 | + And I see 6 of the proxyChecks object |
| 118 | + |
| 119 | + And I see 2 of the upstreams object |
| 120 | + And I see name on the upstreams like yaml |
| 121 | + --- |
| 122 | + - kenia |
| 123 | + - service-3 |
| 124 | + --- |
| 125 | + Scenario: A Proxy without health checks does not display Proxy Health section |
| 126 | + And 2 instance models from yaml |
| 127 | + --- |
| 128 | + - Service: |
| 129 | + ID: service-0-with-id |
| 130 | + Kind: consul |
| 131 | + Node: |
| 132 | + Node: node-0 |
| 133 | + - Service: |
| 134 | + ID: service-0-with-id-proxy |
| 135 | + Kind: connect-proxy |
| 136 | + Node: |
| 137 | + Node: node-0 |
| 138 | + Checks: [] |
| 139 | + --- |
| 140 | + When I visit the instance page for yaml |
| 141 | + --- |
| 142 | + dc: dc1 |
| 143 | + service: service-0 |
| 144 | + node: node-0 |
| 145 | + id: service-0-with-id |
| 146 | + --- |
| 147 | + Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/health-checks |
| 148 | + And I see proxyInfo on the tabs |
| 149 | + |
| 150 | + When I click proxyInfo on the tabs |
| 151 | + Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy-info |
| 152 | + And I see 0 of the proxyChecks object |
| 153 | + Scenario: A Proxy without upstreams does not display Upstreams section |
| 154 | + And 2 instance models from yaml |
| 155 | + --- |
| 156 | + - Service: |
| 157 | + ID: service-0-with-id |
| 158 | + Kind: consul |
| 159 | + Node: |
| 160 | + Node: node-0 |
| 161 | + - Service: |
| 162 | + ID: service-0-with-id-proxy |
| 163 | + Kind: connect-proxy |
| 164 | + Proxy: |
| 165 | + Upstreams: [] |
| 166 | + Node: |
| 167 | + Node: node-0 |
| 168 | + --- |
| 169 | + When I visit the instance page for yaml |
| 170 | + --- |
| 171 | + dc: dc1 |
| 172 | + service: service-0 |
| 173 | + node: node-0 |
| 174 | + id: service-0-with-id |
| 175 | + --- |
| 176 | + Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/health-checks |
| 177 | + And I see proxyInfo on the tabs |
| 178 | + |
| 179 | + When I click proxyInfo on the tabs |
| 180 | + Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy-info |
| 181 | + And I see 0 of the upstreams object |
| 182 | + Scenario: A Proxy without exposed path does not display Exposed Paths section |
| 183 | + And 2 instance models from yaml |
| 184 | + --- |
| 185 | + - Service: |
| 186 | + ID: service-0-with-id |
| 187 | + Kind: consul |
| 188 | + Node: |
| 189 | + Node: node-0 |
| 190 | + - Service: |
| 191 | + ID: service-0-with-id-proxy |
| 192 | + Kind: connect-proxy |
| 193 | + Proxy: |
| 194 | + Expose: |
| 195 | + Checks: false |
| 196 | + Paths: [] |
| 197 | + Node: |
| 198 | + Node: node-0 |
| 199 | + --- |
| 200 | + When I visit the instance page for yaml |
| 201 | + --- |
| 202 | + dc: dc1 |
| 203 | + service: service-0 |
| 204 | + node: node-0 |
| 205 | + id: service-0-with-id |
| 206 | + --- |
| 207 | + Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/health-checks |
| 208 | + And I see proxyInfo on the tabs |
| 209 | + |
| 210 | + When I click proxyInfo on the tabs |
| 211 | + Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy-info |
| 212 | + And I see 0 of the exposedPaths object |
| 213 | + |
| 214 | + |
| 215 | + |
0 commit comments