Skip to content

Commit

Permalink
Update cmd/admin/admin_test.go
Browse files Browse the repository at this point in the history
Reference: #7849 (comment)
Signed-off-by: Eng Zer Jun <[email protected]>
  • Loading branch information
Juneezee committed Nov 27, 2024
1 parent 184f7a3 commit d4dbcfa
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cmd/admin/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import (
)

func Test_findActiveInputMethodFlag(t *testing.T) {
tests := map[string]struct {
tests := []struct {
name string
setInputs map[string]bool
expected string
wantErr bool
}{
"No active flags": {
{
name: "No active flags",
setInputs: map[string]bool{
"-private-key": false,
"-spki-file": false,
Expand All @@ -22,7 +23,8 @@ func Test_findActiveInputMethodFlag(t *testing.T) {
expected: "",
wantErr: true,
},
"Multiple active flags": {
{
name: "Multiple active flags",
setInputs: map[string]bool{
"-private-key": true,
"-spki-file": true,
Expand All @@ -31,7 +33,8 @@ func Test_findActiveInputMethodFlag(t *testing.T) {
expected: "",
wantErr: true,
},
"Single active flag": {
{
name: "Single active flag",
setInputs: map[string]bool{
"-private-key": true,
"-spki-file": false,
Expand Down

0 comments on commit d4dbcfa

Please sign in to comment.