func NewProfileFromTmpDir(t *testing.T, name string) (*user.Profile, func()) {
	t.Helper()
	tmpDir, teardown, err := u.NewTempDir(name)
	assert.Nil(t, err)
	_, resetHomeDir := u.SetupHomeDir(tmpDir)
	profile := NewProfile(t)
	profile.WorkingDirectory = tmpDir
	return profile,
		func() {
			resetHomeDir()
			teardown()
		}
}
NewProfileFromTmpDir returns a new CLI profile with a random name
and a current working directory based on a temporary directory
along with the associated cleanup function
package mock
import (
	"os"
	"testing"
	"github.com/10gen/realm-cli/internal/cli/user"
	"github.com/10gen/realm-cli/internal/cloud/realm"
	u "github.com/10gen/realm-cli/internal/utils/test"
	"github.com/10gen/realm-cli/internal/utils/test/assert"
	"go.mongodb.org/mongo-driver/bson/primitive"
)
func NewProfile(t *testing.T) *user.Profile {
	t.Helper()
	profile, err := user.NewProfile(primitive.NewObjectID().Hex())
	assert.Nil(t, err)
	return profile
}