Skip to content

Commit dfe66b7

Browse files
committed
Explain use of localServer in version checker dg
We are using this since we don't support the injecting of a fake client. This is a difference with the dynamic dg I feel is worth highlighting. Signed-off-by: Charlie Egan <[email protected]>
1 parent d436b64 commit dfe66b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/datagatherer/versionchecker/versionchecker_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ registries:
125125
// pods, then check the found images using version checker. Version checker
126126
// will call the same version checker to get image tag data
127127
func TestVersionCheckerFetch(t *testing.T) {
128-
// server to handle requests made my version checker and k8s dynamic dg
128+
// server to handle requests made by version checker and k8s dynamic dg.
129+
//
130+
// since we do not support injecting a fake client as a dependency to the
131+
// version checker datagatherer we are instead using an httptest
132+
// LocalServer to mock requests from a real dynamic client
129133
localServer := createLocalTestServer(t)
130134

131135
// parse the URL of the server to generate the KubeConfig file

0 commit comments

Comments
 (0)