As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit b9d16c7a authored by Ash McKenzie's avatar Ash McKenzie
Browse files

Merge branch...

Merge branch '504-remove-the-session-duration-information-from-the-output-of-2fa_verify-command' into 'main'

Resolve "Remove the session duration information from the output of `2fa_verify` command"

See merge request gitlab-org/gitlab-shell!445
parents d3a70746 9309666f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -46,7 +46,7 @@ func (c *Command) verifyOTP(ctx context.Context, otp string) error {
err = client.VerifyOTP(ctx, c.Args, otp)
if err == nil {
fmt.Fprint(c.ReadWriter.Out, "\nOTP validation successful. Git operations are allowed for the next 15 minutes.\n")
fmt.Fprint(c.ReadWriter.Out, "\nOTP validation successful. Git operations are now allowed.\n")
} else {
fmt.Fprintf(c.ReadWriter.Out, "\nOTP validation failed.\n%v\n", err)
}
Loading
Loading
Loading
Loading
@@ -74,7 +74,7 @@ func TestExecute(t *testing.T) {
arguments: &commandargs.Shell{GitlabKeyId: "1"},
answer: "123456\n",
expectedOutput: question +
"OTP validation successful. Git operations are allowed for the next 15 minutes.\n",
"OTP validation successful. Git operations are now allowed.\n",
},
{
desc: "With bad response",
Loading
Loading
Loading
Loading
@@ -75,7 +75,7 @@ describe 'bin/gitlab-shell 2fa_verify' do
stdin.puts('123456')
expect(stdout.flush.read).to eq("\nOTP validation successful. Git operations are allowed for the next 15 minutes.\n")
expect(stdout.flush.read).to eq("\nOTP validation successful. Git operations are now allowed.\n")
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment