@@ -12,11 +12,11 @@ import (
12
12
const (
13
13
localhost = "127.0.0.1"
14
14
pingEntrypoint = "http://" + localhost + ":8080/ping"
15
- pingTargetUrl = "target:8080/ping"
16
- pingUrl = pingEntrypoint + "?address=" + pingTargetUrl
15
+ pingTargetURL = "target:8080/ping"
16
+ pingURL = pingEntrypoint + "?address=" + pingTargetURL
17
17
18
18
volumefileEntrypoint = "http://" + localhost + ":8080/volumefile"
19
- volumeUrl = volumefileEntrypoint + "?filename="
19
+ volumeURL = volumefileEntrypoint + "?filename="
20
20
21
21
udpEntrypoint = "http://" + localhost + ":8080/udp"
22
22
@@ -40,7 +40,7 @@ func TestSimpleNetwork(t *testing.T) {
40
40
specRef : "Networks-top-level-element" ,
41
41
}
42
42
h .TestUpDown (func () {
43
- actual := h .getHttpBody ( pingUrl )
43
+ actual := h .getHTTPBody ( pingURL )
44
44
expected := jsonResponse ("PONG FROM TARGET" )
45
45
h .Check (expected , actual )
46
46
})
@@ -53,7 +53,7 @@ func TestSimpleNetworkFail(t *testing.T) {
53
53
specRef : "Networks-top-level-element" ,
54
54
}
55
55
h .TestUpDown (func () {
56
- actual := h .getHttpBody (pingEntrypoint + "?address=notatarget:8080/ping" )
56
+ actual := h .getHTTPBody (pingEntrypoint + "?address=notatarget:8080/ping" )
57
57
expected := jsonResponse ("Could not reach address: notatarget:8080/ping" )
58
58
h .Check (expected , actual )
59
59
})
@@ -66,7 +66,7 @@ func TestDifferentNetworks(t *testing.T) {
66
66
specRef : "Networks-top-level-element" ,
67
67
}
68
68
h .TestUpDown (func () {
69
- actual := h .getHttpBody ( pingUrl )
69
+ actual := h .getHTTPBody ( pingURL )
70
70
expected := jsonResponse ("Could not reach address: target:8080/ping" )
71
71
h .Check (expected , actual )
72
72
})
@@ -79,7 +79,7 @@ func TestVolumeFile(t *testing.T) {
79
79
specRef : "volumes-top-level-element" ,
80
80
}
81
81
h .TestUpDown (func () {
82
- actual := h .getHttpBody ( volumeUrl + "test_volume.txt" )
82
+ actual := h .getHTTPBody ( volumeURL + "test_volume.txt" )
83
83
expected := jsonResponse ("MYVOLUME" )
84
84
h .Check (expected , actual )
85
85
@@ -93,7 +93,7 @@ func TestSecretFile(t *testing.T) {
93
93
specRef : "secrets-top-level-element" ,
94
94
}
95
95
h .TestUpDown (func () {
96
- actual := h .getHttpBody ( volumeUrl + "test_secret.txt" )
96
+ actual := h .getHTTPBody ( volumeURL + "test_secret.txt" )
97
97
expected := jsonResponse ("MYSECRET" )
98
98
h .Check (expected , actual )
99
99
})
@@ -107,7 +107,7 @@ func TestConfigFile(t *testing.T) {
107
107
specRef : "configs-top-level-element" ,
108
108
}
109
109
h .TestUpDown (func () {
110
- actual := h .getHttpBody ( volumeUrl + "test_config.txt" )
110
+ actual := h .getHTTPBody ( volumeURL + "test_config.txt" )
111
111
expected := jsonResponse ("MYCONFIG" )
112
112
h .Check (expected , actual )
113
113
})
@@ -133,7 +133,7 @@ func TestUdpPort(t *testing.T) {
133
133
_ , err = Conn .Write (buf )
134
134
h .NilError (err )
135
135
time .Sleep (time .Second ) // Wait for the registration
136
- actual := h .getHttpBody (udpEntrypoint )
136
+ actual := h .getHTTPBody (udpEntrypoint )
137
137
expected := jsonResponse (udpValue )
138
138
h .Check (expected , actual )
139
139
})
@@ -148,7 +148,7 @@ func TestScaling(t *testing.T) {
148
148
}
149
149
h .TestUpDown (func () {
150
150
time .Sleep (2 * time .Second ) // Wait so the clients can register
151
- actual := h .getHttpBody (scaleEntrypoint )
151
+ actual := h .getHTTPBody (scaleEntrypoint )
152
152
responseArray := Response {}
153
153
err := yaml .Unmarshal ([]byte (actual ), & responseArray )
154
154
h .NilError (err )
0 commit comments