File: regression_create_test.go

package info (click to toggle)
golang-github-zitadel-oidc 3.37.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 1,484 kB
  • sloc: makefile: 5
file content (24 lines) | stat: -rw-r--r-- 528 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
23
24
//go:build create_regression_data

package oidc

import (
	"os"
	"testing"

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

// Test_create_regression generates the regression data.
// It is excluded from regular testing, unless
// called with the create_regression_data tag:
// go test -tags="create_regression_data" ./pkg/oidc
func Test_create_regression(t *testing.T) {
	for _, obj := range regressionData {
		file, err := os.Create(jsonFilename(obj))
		require.NoError(t, err)
		defer file.Close()

		encodeJSON(t, file, obj)
	}
}