add contextcheck linter exceptions
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
parent
de54201f69
commit
1248be8bba
@ -46,6 +46,7 @@ func NewACMESolverCommand(_ context.Context) *cobra.Command {
|
||||
|
||||
return nil
|
||||
},
|
||||
// nolint:contextcheck // False positive
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
runCtx := cmd.Context()
|
||||
log := logf.FromContext(runCtx)
|
||||
|
||||
@ -100,6 +100,7 @@ servers and webhook servers.`,
|
||||
|
||||
return nil
|
||||
},
|
||||
// nolint:contextcheck // False positive
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return run(cmd.Context(), cainjectorConfig)
|
||||
},
|
||||
|
||||
@ -110,6 +110,7 @@ to renew certificates at an appropriate time before expiry.`,
|
||||
|
||||
return nil
|
||||
},
|
||||
// nolint:contextcheck // False positive
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return run(cmd.Context(), controllerConfig)
|
||||
},
|
||||
|
||||
@ -79,6 +79,7 @@ required webhooks are reachable by the K8S API server.`,
|
||||
PreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
return o.Complete()
|
||||
},
|
||||
// nolint:contextcheck // False positive
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return o.Run(cmd.Context(), cmd.OutOrStdout())
|
||||
},
|
||||
|
||||
@ -107,6 +107,7 @@ functionality for cert-manager.`,
|
||||
|
||||
return nil
|
||||
},
|
||||
// nolint:contextcheck // False positive
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return run(cmd.Context(), webhookConfig)
|
||||
},
|
||||
|
||||
@ -66,6 +66,7 @@ func NewCommandStartWebhookServer(_ context.Context, groupName string, solvers .
|
||||
cmd := &cobra.Command{
|
||||
Short: "Launch an ACME solver API server",
|
||||
Long: "Launch an ACME solver API server",
|
||||
// nolint:contextcheck // False positive
|
||||
RunE: func(c *cobra.Command, args []string) error {
|
||||
runCtx := c.Context()
|
||||
|
||||
|
||||
@ -1065,13 +1065,13 @@ cKK5t8N1YDX5CV+01X3vvxpM3ciYuCY9y+lSegrIEI+izRyD7P9KaZlwMaYmsBZq
|
||||
By("Updating the Certificate after having added an additional dnsName")
|
||||
newDNSName := e2eutil.RandomSubdomain(s.DomainSuffix)
|
||||
retry.RetryOnConflict(retry.DefaultRetry, func() error {
|
||||
err = f.CRClient.Get(context.Background(), types.NamespacedName{Name: testCertificate.Name, Namespace: testCertificate.Namespace}, testCertificate)
|
||||
err = f.CRClient.Get(ctx, types.NamespacedName{Name: testCertificate.Name, Namespace: testCertificate.Namespace}, testCertificate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
testCertificate.Spec.DNSNames = append(testCertificate.Spec.DNSNames, newDNSName)
|
||||
err = f.CRClient.Update(context.Background(), testCertificate)
|
||||
err = f.CRClient.Update(ctx, testCertificate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -393,9 +393,11 @@ func (s *Suite) Define() {
|
||||
// Create the request, and delete at the end of the test
|
||||
By("Creating a CertificateSigningRequest")
|
||||
Expect(f.CRClient.Create(ctx, kubeCSR)).NotTo(HaveOccurred())
|
||||
// nolint: contextcheck // This is a cleanup context
|
||||
defer func() {
|
||||
// nolint: contextcheck // This is a cleanup context
|
||||
f.CRClient.Delete(context.TODO(), kubeCSR)
|
||||
cleanupCtx := context.Background()
|
||||
|
||||
f.CRClient.Delete(cleanupCtx, kubeCSR)
|
||||
}()
|
||||
|
||||
// Approve the request for testing, so that cert-manager may sign the
|
||||
|
||||
Loading…
Reference in New Issue
Block a user