Test --skip-ssh-key is captured correctly

Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
This commit is contained in:
Babak K. Shandiz 2024-04-06 13:11:02 +01:00
parent 0a77c56c44
commit 8839ee7ddf
No known key found for this signature in database
GPG key ID: 44950AED81AD710F

View file

@ -204,6 +204,23 @@ func Test_NewCmdLogin(t *testing.T) {
InsecureStorage: true,
},
},
{
name: "tty skip-ssh-key",
stdinTTY: true,
cli: "--skip-ssh-key",
wants: LoginOptions{
SkipSSHKeyPrompt: true,
Interactive: true,
},
},
{
name: "nontty skip-ssh-key",
cli: "--skip-ssh-key",
wants: LoginOptions{
Hostname: "github.com",
SkipSSHKeyPrompt: true,
},
},
}
for _, tt := range tests {