Skip to content

Commit

Permalink
Fix unittest.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgooch committed Jun 14, 2020
1 parent 8ec4d63 commit c979562
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/keymasterd/2fa_bootstrapOTP_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ func testCreateRuntimeStateWithBootstrapOTP(t *testing.T,
return state, tmpdir, nil
}

func TestBootstrapOtpAuthNotPost(t *testing.T) {
func TestBootstrapOtpAuthNotGetOrPost(t *testing.T) {
state, tmpdir, err := testCreateRuntimeStateForBootstrapOTP(t)
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tmpdir)
recorder := httptest.NewRecorder()
w := &instrumentedwriter.LoggingWriter{ResponseWriter: recorder}
req := httptest.NewRequest("GET", "/", nil)
req := httptest.NewRequest("PUT", "/", nil)
state.BootstrapOtpAuthHandler(w, req)
resp := recorder.Result()
body, _ := ioutil.ReadAll(resp.Body)
Expand Down

0 comments on commit c979562

Please sign in to comment.