...

Source file src/github.com/letsencrypt/boulder/crl/crl_test.go

Documentation: github.com/letsencrypt/boulder/crl

     1  package crl
     2  
     3  import (
     4  	"fmt"
     5  	"math/big"
     6  	"testing"
     7  	"time"
     8  
     9  	"github.com/letsencrypt/boulder/test"
    10  )
    11  
    12  func TestId(t *testing.T) {
    13  	thisUpdate := time.Now()
    14  	out := Id(1337, 1, Number(thisUpdate))
    15  	expectCRLId := fmt.Sprintf("{\"issuerID\":1337,\"shardIdx\":1,\"crlNumber\":%d}", big.NewInt(thisUpdate.UnixNano()))
    16  	test.AssertEquals(t, string(out), expectCRLId)
    17  }
    18  

View as plain text