code: func AssertCertificateHasDNSNames(t *testing.T, cert *x509.Certificate, DNSNames ...string) {
  	for _, DNSName := range DNSNames {
  		found := false
  		for _, val := range cert.DNSNames {
  			if val == DNSName {
  				found = true
  				break
  			}
  		}
  
  		if !found {
  			t.Errorf("cert does not contain DNSName %s", DNSName)
  		}
  	}
  }
docs: // AssertCertificateHasDNSNames is a utility function for kubeadm testing that asserts if a given certificate has
  // the expected DNSNames