Skip to content

Commit 0e8875d

Browse files
committed
tests: use a more expressive fake URL http://api.venafi.eu
The URL http://localhost:8080 suggested that this test was using a fake server, and didn't indicate clearly which API (the old jetstack-secure API or the newer Venafi Cloud Plaform API).
1 parent 7f6334f commit 0e8875d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/agent/config_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ import (
1919
func TestGetConfiguration(t *testing.T) {
2020
t.Run("minimal successful configuration", func(t *testing.T) {
2121
got, cl, err := getConfiguration(discardLogs(t),
22-
Config{Server: "http://localhost:8080", Period: 1 * time.Hour},
22+
Config{Server: "http://api.venafi.eu", Period: 1 * time.Hour},
2323
AgentCmdFlags{},
2424
)
2525
assert.NoError(t, err)
2626
assert.Equal(t, Config{
27-
Server: "http://localhost:8080",
27+
Server: "http://api.venafi.eu",
2828
Period: 1 * time.Hour,
2929
}, got)
3030
assert.IsType(t, &client.UnauthenticatedClient{}, cl)
3131
})
3232

3333
t.Run("period must be given", func(t *testing.T) {
3434
_, _, err := getConfiguration(discardLogs(t),
35-
Config{Server: "http://localhost:8080"},
35+
Config{Server: "http://api.venafi.eu"},
3636
AgentCmdFlags{})
3737
assert.EqualError(t, err, "period must be set as a flag or in config")
3838
})
@@ -192,7 +192,7 @@ func TestGetConfiguration(t *testing.T) {
192192
// Fills in the `server` and `period` as they appear in each and every test
193193
// case.
194194
func fillRequired(c Config) Config {
195-
c.Server = "http://localhost:8080"
195+
c.Server = "http://api.venafi.eu"
196196
c.Period = 1 * time.Hour
197197
return c
198198
}

0 commit comments

Comments
 (0)