Skip to content

Commit

Permalink
remove gossip key and update tests for fips
Browse files Browse the repository at this point in the history
  • Loading branch information
skpratt committed Jun 6, 2023
1 parent a5ba889 commit 9135d47
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agent/consul/merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"github.com/hashicorp/consul/sdk/testutil"
"github.com/hashicorp/consul/types"
"github.com/hashicorp/consul/version"
)

func TestMerge_LAN(t *testing.T) {
Expand Down Expand Up @@ -282,6 +283,7 @@ func makeTestNode(t *testing.T, tm testMember) *serf.Member {
"vsn": "2",
"vsn_max": "3",
"vsn_min": "2",
"fips": version.GetFIPSInfo(),
},
}
if tm.partition != "" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/hashicorp/consul/agent/grpc-external/testutils"
structs "github.com/hashicorp/consul/agent/structs"
"github.com/hashicorp/consul/proto-public/pbdataplane"
"github.com/hashicorp/consul/version"
)

const testACLToken = "acl-token"
Expand Down Expand Up @@ -50,6 +51,8 @@ func TestSupportedDataplaneFeatures_Success(t *testing.T) {
require.True(t, feature.GetSupported())
case pbdataplane.DataplaneFeatures_DATAPLANE_FEATURES_ENVOY_BOOTSTRAP_CONFIGURATION:
require.True(t, feature.GetSupported())
case pbdataplane.DataplaneFeatures_DATAPLANE_FEATURES_FIPS:
require.Equal(t, version.IsFIPS(), feature.GetSupported())
default:
require.False(t, feature.GetSupported())
}
Expand Down
2 changes: 2 additions & 0 deletions tlsutil/config_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
//go:build !fips
// +build !fips

package tlsutil

Expand Down
4 changes: 4 additions & 0 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ func GetHumanVersion() string {
version += fmt.Sprintf("-%s", release)
}

if IsFIPS() {
version += ".fips1402"
}

if metadata != "" {
version += fmt.Sprintf("+%s", metadata)
}
Expand Down

0 comments on commit 9135d47

Please sign in to comment.