2023-03-28 18:39:22 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2023-03-13 21:19:11 +00:00
|
|
|
//go:build !consulent
|
|
|
|
// +build !consulent
|
|
|
|
|
|
|
|
package state
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/hashicorp/consul/agent/structs"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestStore_SamenessGroup_checkSamenessGroup(t *testing.T) {
|
|
|
|
s := testStateStore(t)
|
|
|
|
err := s.EnsureConfigEntry(0, &structs.SamenessGroupConfigEntry{
|
|
|
|
Name: "sg1",
|
|
|
|
})
|
|
|
|
require.ErrorContains(t, err, "sameness-groups are an enterprise-only feature")
|
|
|
|
}
|