diff --git a/keptn-cert-manager/pkg/certificates/watcher.go b/keptn-cert-manager/pkg/certificates/watcher.go index 9f5275e27c..b45371b0be 100644 --- a/keptn-cert-manager/pkg/certificates/watcher.go +++ b/keptn-cert-manager/pkg/certificates/watcher.go @@ -135,3 +135,11 @@ func (watcher *CertificateWatcher) ValidateCertificateExpiration(certData []byte } return true, nil } + +type NoOpCertificateWatcher struct{} + +func (nw *NoOpCertificateWatcher) WaitForCertificates() {} + +func NewNoOpCertificateWatcher() *NoOpCertificateWatcher { + return &NoOpCertificateWatcher{} +} diff --git a/keptn-cert-manager/pkg/certificates/watcher_test.go b/keptn-cert-manager/pkg/certificates/watcher_test.go index 7d10971354..ae3dd0cca1 100644 --- a/keptn-cert-manager/pkg/certificates/watcher_test.go +++ b/keptn-cert-manager/pkg/certificates/watcher_test.go @@ -320,3 +320,7 @@ func TestNewCertificateWatcher(t *testing.T) { require.EqualValues(t, got, want) } + +func TestNewNoOpCertificateWatcher(t *testing.T) { + require.EqualValues(t, NewNoOpCertificateWatcher(), &NoOpCertificateWatcher{}) +}