* [COMPLIANCE] Update Copyright and License Headers * chore: make gen to generate files with copyright headers * chore: update missed copyright headers --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Justin Nguyen <justin.nguyen@hashicorp.com>
22 lines
421 B
Go
22 lines
421 B
Go
// Copyright IBM Corp. 2020, 2025
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package event
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func Test_newId(t *testing.T) {
|
|
t.Run("basics", func(t *testing.T) {
|
|
assert, require := assert.New(t), require.New(t)
|
|
got, err := NewId("pre")
|
|
require.NoError(err)
|
|
assert.True(strings.HasPrefix(got, "pre"))
|
|
})
|
|
}
|