You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: login_oneshot_test.go
    path of file: ./repos/client/go/engine
    
    the code of the file until where you have to start completion: package engine

import (
	"github.com/keybase/client/go/libkb"
	keybase1 "github.com/keybase/client/go/protocol/keybase1"
	"github.com/stretchr/testify/require"
	"testing"
)

func TestLoginOneshot(t *testing.T) {
	tc := SetupEngineTest(t, "login")
	defer tc.Cleanup()
	fu := NewFakeUserOrBust(t, "paper")
	arg := MakeTestSignupEngineRunArg(fu)
	arg.SkipPaper = false
	arg.StoreSecret = true
	loginUI := &paperLoginUI{Username: fu.Username}
	uis := libkb.UIs{
		LogUI:    tc.G.UI.GetLogUI(),
		GPGUI:    &gpgtestui{},
		SecretUI: fu.NewSecretUI(),
		LoginUI:  loginUI,
	}
	s := NewSignupEngine(tc.G, &arg)
	m := NewMetaContextForTest(tc).WithUIs(uis)
	err := RunEngine2(m, s)
	require.NoError(t, err)
	require.True(t, len(loginUI.PaperPhrase) > 0)

	assertNumDevicesAndKeys(tc, fu, 2, 4)
	assertSecretStored(tc, fu.Username)
	Logout(tc)
	assertSecretNotStored(tc, fu.Username)

	tc2 := SetupEngineTest(t, "login")
	defer tc2.Cleanup()

	eng := NewLoginOneshot(tc2.G, keybase1.LoginOneshotArg{
		Username: fu.NormalizedUsername().String(),
		PaperKey: loginUI.PaperPhrase,
	})
	m = NewMetaContextForTest(tc2)
	err = RunEngine2(m, eng)
	require.NoError(t, err)
	assertNumDevicesAndKeys(tc, fu, 2, 4)
	err = AssertProvisioned(tc2)
	require.NoError(t, 
    
func TestLoginOneshotNoLogout(t *testing.T) {
	tc := SetupEngineTest(t, "login")
	defer tc.Cleanup()
	fu := NewFakeUserOrBust(t, "paper")
	arg := MakeTestSignupEngineRunArg(fu)
	arg.SkipPaper = false
	arg.StoreSecret = true
	loginUI := &paperLoginUI{Username: fu.Username}
	uis := libkb.UIs{
		LogUI:    tc.G.UI.GetLogUI(),
		GPGUI:    &gpgtestui{},
		SecretUI: fu.NewSecretUI(),
		LoginUI:  loginUI,
	}
	s := NewSignupEngine(tc.G, &arg)
	m := NewMetaContextForTest(tc).WithUIs(uis)
	err := RunEngine2(m, s)
	require.NoError(t, err)
	require.True(t, len(loginUI.PaperPhrase) > 0)

	assertNumDevicesAndKeys(tc, fu, 2, 4)
	assertSecretStored(tc, fu.Username)

	tc2 := SetupEngineTest(t, "login")
	tc2.G.Env.Test.DevelName = tc.G.Env.Test.DevelName

	// Assert that tc2 and tc share the same keychain, since they are
	// on the same machine with the above testing flag override. This only
	// works on Darwin due to the global nature of the keychain.
	if libkb.RuntimeGroup() == keybase1.RuntimeGroup_DARWINLIKE {
		assertSecretStored(tc2, fu.Username)
	}
	defer tc2.Cleanup()

	eng := NewLoginOneshot(tc2.G, keybase1.LoginOneshotArg{
		Username: fu.NormalizedUsername().String(),
		PaperKey: loginUI.PaperPhrase,
	})
	m = NewMetaContextForTest(tc2)
	err = RunEngine2(m, eng)
	require.NoError(t, err)
	assertNumDevicesAndKeys(tc, fu, 2, 4)
	err = AssertProvisioned(tc2)
	require.NoError(t, err)

	// This is the crux of the test --- logout in the oneshot regime (via Logout(tc2))
	// but make sure that the standard install isn't touched. Hence, we need to clear
	// the memory store to make sure it also doesn't get in the way of the test.
	tc.G.SecretStore().ClearMem()
	assertSecretStored(tc, fu.Username)
	Logout(tc2)
	tc.G.SecretStore().ClearMem()
	assertSecretStored(tc, fu.Username)
}