1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
11 func TestCert(t *testing.T) {
12 cert, err := CertGenerator{Bits: 1024, Hosts: []string{"localhost"}, IsCA: false}.Generate()
16 if len(cert.Certificate) < 1 {
17 t.Error("no certificate!")
19 cert, err = CertGenerator{Bits: 2048, Hosts: []string{"localhost"}, IsCA: true}.Generate()
23 if len(cert.Certificate) < 1 {
24 t.Error("no certificate!")