INNER CODE UNIT · Go
TestAskKeyfile
GGP1/kure · auth/auth_test.go:91
func TestAskKeyfile(t *testing.T) {
cases := []struct {
desc string
input string
expectedCfgPath string
expected bool
}{
{
desc: "Do not use key file",
expected: false,
input: "n\n",
expectedCfgPath: "./testdata/test-32.key",
},
{
desc: "Use key file with custom path",
expected: true,
input: "y\nn\n",
expectedCfgPath: "",