Skip to content

Commit 56524de

Browse files
committed
Adding skeleton for FIPS-to-FIPS upgrade test
1 parent d845264 commit 56524de

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
// or more contributor license agreements. Licensed under the Elastic License 2.0;
3+
// you may not use this file except in compliance with the Elastic License 2.0.
4+
5+
//go:build integration
6+
7+
package integration
8+
9+
import (
10+
"testing"
11+
12+
"github.com/stretchr/testify/require"
13+
14+
atesting "github.com/elastic/elastic-agent/pkg/testing"
15+
"github.com/elastic/elastic-agent/pkg/testing/define"
16+
)
17+
18+
// This file contains upgrade tests that pertain to FIPS-compliant Agent artifacts.
19+
20+
// TestStandaloneUpgradeFIPStoFIPS ensures that upgrading a FIPS-compliant Agent
21+
// results in the new (post-upgrade) Agent to also be FIPS-compliant.
22+
func TestStandaloneUpgradeFIPStoFIPS(t *testing.T) {
23+
define.Require(t, define.Requirements{
24+
Group: StandaloneUpgrade,
25+
Local: false, // requires Agent installation
26+
Sudo: true, // requires Agent installation
27+
})
28+
29+
// Start with a FIPS-compliant Agent artifact
30+
// TODO: introduce FIPS option for artifact fetcher
31+
startFixture, err := atesting.NewFixture(
32+
t,
33+
startVersion.String(),
34+
atesting.WithFetcher(atesting.ArtifactFetcher()),
35+
)
36+
require.NoError(t, err, "error creating previous agent fixture")
37+
38+
// Upgrade to newer version of Agent
39+
40+
// Check that new (post-upgrade) Agent is also FIPS-compliant
41+
// TODO: check if Agent status contains information about FIPS mode
42+
}

0 commit comments

Comments
 (0)