Skip to content

Commit d0cff30

Browse files
committed
Move skip function to individual unit tests
1 parent 0790808 commit d0cff30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config/configtls/tpm_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
)
3434

3535
func TestTPM_loadCertificate(t *testing.T) {
36+
testutil.SkipIfFIPSOnly(t, "use of CFB is not allowed in FIPS 140-only mode")
3637
tpm, err := simulator.OpenSimulator()
3738
require.NoError(t, err)
3839
defer tpm.Close()
@@ -100,6 +101,7 @@ func TestTPM_loadCertificate_error(t *testing.T) {
100101
}
101102

102103
func TestTPM_tpmCertificate_errors(t *testing.T) {
104+
testutil.SkipIfFIPSOnly(t, "use of CFB is not allowed in FIPS 140-only mode")
103105
tpm, err := simulator.OpenSimulator()
104106
require.NoError(t, err)
105107
defer tpm.Close()
@@ -190,7 +192,6 @@ func TestTPM_open(t *testing.T) {
190192
}
191193

192194
func createTPMKeyCert(t *testing.T, tpm transport.TPMCloser) ([]byte, []byte) {
193-
testutil.SkipIfFIPSOnly(t, "use of CFB is not allowed in FIPS 140-only mode")
194195
tpmKey, err := keyfile.NewLoadableKey(tpm, tpm2.TPMAlgECC, 256, []byte(""))
195196
require.NoError(t, err)
196197
tpmKeySigner, err := tpmKey.Signer(tpm, []byte(""), []byte(""))

0 commit comments

Comments
 (0)