mirror of
https://github.com/minio/minio.git
synced 2025-02-03 09:55:59 -05:00
Add x509 tests and should be part of the build
This commit is contained in:
parent
452d46bfa6
commit
ac99968796
2
Makefile
2
Makefile
@ -21,6 +21,8 @@ build-utils:
|
|||||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/crypto/sha512
|
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/crypto/sha512
|
||||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/checksum/crc32c
|
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/checksum/crc32c
|
||||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/database/tiedot
|
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/database/tiedot
|
||||||
|
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/crypto/keys
|
||||||
|
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/crypto/x509
|
||||||
|
|
||||||
#build-os:
|
#build-os:
|
||||||
# @godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/os/scsi
|
# @godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/os/scsi
|
||||||
|
27
pkg/utils/crypto/x509/generator_test.go
Normal file
27
pkg/utils/crypto/x509/generator_test.go
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
package x509
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
. "gopkg.in/check.v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test(t *testing.T) { TestingT(t) }
|
||||||
|
|
||||||
|
type MySuite struct{}
|
||||||
|
|
||||||
|
var _ = Suite(&MySuite{})
|
||||||
|
|
||||||
|
func (s *MySuite) Testing(c *C) {
|
||||||
|
certObj := Certificates{}
|
||||||
|
params := X509Params{
|
||||||
|
Hostname: "example.com",
|
||||||
|
IsCA: false,
|
||||||
|
EcdsaCurve: "P224",
|
||||||
|
ValidFrom: "Jan 1 15:04:05 2015",
|
||||||
|
ValidFor: time.Duration(3600),
|
||||||
|
}
|
||||||
|
err := certObj.GenerateCertificates(params)
|
||||||
|
c.Assert(err, IsNil)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user