// TestBadGenerator ensures that a request that fails the validator is
// not processed.
TestBadGenerator ensures that a request that fails the validator is
not processed.
// TestBadGenerator ensures that a request that fails the validator is // not processed .
func TestBadGenerator(t *testing.T) {
	g := &Generator{testValidator}
	missingCN := &CertificateRequest{
		Names: []Name{
			{
				C:  "US",
				ST: "California",
				L:  "San Francisco",
				O:  "CloudFlare",
				OU: "Systems Engineering",
			},
		},
		Hosts:      []string{"cloudflare.com", "www.cloudflare.com"},
		KeyRequest: &KeyRequest{"rsa", 2048},
	}
	_, _, err := g.ProcessRequest(missingCN)
	if err == nil {
		t.Fatalf("Request should have failed.")
	}
}
func TestBadGenerator ( t * testing . T ) { g := & Generator { testValidator } missingCN := & CertificateRequest { Names : [ ] Name { { C : " " , ST : " " , L : " " , O : " " , OU : " " , } , } , Hosts : [ ] string { " " , " " } , KeyRequest : & KeyRequest { " " , 2048 } , } _ , _ , err := g . ProcessRequest ( missingCN ) if err == nil { t . Fatalf ( " " ) } }
TestBadGenerator ensures that a request that fails the validator is
not processed.
TestBadGenerator ensures that a request that fails the validator is not processed .
// Missing CN