github.com/hernad/nomad@v1.6.112/nomad/state/indexer/indexer_test.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package indexer
     5  
     6  import (
     7  	"testing"
     8  	"time"
     9  
    10  	"github.com/stretchr/testify/require"
    11  )
    12  
    13  func Test_IndexBuilder_Time(t *testing.T) {
    14  	builder := &IndexBuilder{}
    15  	testTime := time.Date(1987, time.April, 13, 8, 3, 0, 0, time.UTC)
    16  	builder.Time(testTime)
    17  	require.Equal(t, []byte{0, 0, 0, 0, 32, 128, 155, 180}, builder.Bytes())
    18  }