File: tpmstore_test.go

package info (click to toggle)
golang-github-smallstep-crypto 0.57.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,284 kB
  • sloc: sh: 53; makefile: 36
file content (22 lines) | stat: -rw-r--r-- 376 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package storage

import (
	"context"
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestFromContext(t *testing.T) {
	t.Parallel()

	exp := new(Dirstore)
	got := FromContext(NewContext(context.Background(), exp))
	assert.Same(t, exp, got)
}

func TestFromContextPanics(t *testing.T) {
	t.Parallel()

	assert.Panics(t, func() { FromContext(context.Background()) })
}