From 3fe555b0bb7c83cb6f06e83de929c6c3ef1300f2 Mon Sep 17 00:00:00 2001 From: William Martin Date: Fri, 17 May 2024 14:33:19 +0200 Subject: [PATCH] Comment the purpose of the helper config contract --- pkg/cmd/auth/shared/contract/helper_config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/cmd/auth/shared/contract/helper_config.go b/pkg/cmd/auth/shared/contract/helper_config.go index 287eb7c90..d507e1091 100644 --- a/pkg/cmd/auth/shared/contract/helper_config.go +++ b/pkg/cmd/auth/shared/contract/helper_config.go @@ -7,6 +7,11 @@ import ( "github.com/stretchr/testify/require" ) +// This HelperConfig contract exist to ensure that any HelperConfig implementation conforms to this behaviour. +// This is useful because we can swap in fake implementations for testing, rather than requiring our tests to be +// isolated from git. +// +// See for example, TestAuthenticatingGitCredentials for LoginFlow. type HelperConfig struct { NewHelperConfig func(t *testing.T) shared.HelperConfig ConfigureHelper func(t *testing.T, hostname string)