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: rollback_test.go
    path of file: ./repos/lakeFS/esti
    
    the code of the file until where you have to start completion: package esti

import (
	"fmt"
	"testing"

	"github.com/go-openapi/swag"
	"github.com/stretchr/testify/require"
	"github.com/treeverse/lakefs/pkg/api/apigen"
)

func TestResetAll(t *testing.T) {
	ctx, _, repo := setupTest(t)
	defer tearDownTest(repo)

	const objPath = "1.txt"

	// upload file
	_, objContent := uploadFileRandomData(ctx, t, repo, mainBranch, objPath)
	f, err := found(ctx, repo, mainBranch, objPath)
	require.NoError(t, err)
	require.True(t, f, "uploaded object found")

	// commit file
	commitResp, err := client.CommitWithResponse(ctx, repo, mainBranch, &apigen.CommitParams{}, apigen.CommitJSONRequestBody{
		Message: "resetAll",
	})
	require.NoError(t, err, "failed to commit changes")
	require.NoErrorf(t, verifyResponse(commitResp.HTTPResponse, commitResp.Body),
		"failed to commit changes repo %s branch %s", repo, mainBranch)

	// delete file
	deleteResp, err := client.DeleteObjectWithResponse(ctx, repo, mainBranch, &apigen.DeleteObjectParams{
		Path: objPath,
	})
	require.NoError(t, err, "failed to delete file")
	require.NoErrorf(t, verifyResponse(deleteResp.HTTPResponse, deleteResp.Body),
		"failed to delete file %s repo %s branch %s", objPath, repo, mainBranch)

	// reset
	reset := apigen.ResetCreation{Type: "reset"}

	resetResp, err := client.ResetBranchWithResponse(ctx, repo, mainBranch, apigen.ResetBranchJSONRequestBody(reset))
	require.NoError(t, err, "failed to reset")
	require.NoErrorf(t, verifyResponse(resetResp.HTTPResponse, resetResp.Body),
		"faile
    
func TestResetObject(t *testing.T) {
	ctx, _, repo := setupTest(t)
	defer tearDownTest(repo)
	objPath1 := "1.txt"
	objPath2 := "2.txt"

	// upload files
	_, objContent1 := uploadFileRandomData(ctx, t, repo, mainBranch, objPath1)
	f, err := found(ctx, repo, mainBranch, objPath1)
	require.NoError(t, err)
	require.True(t, f, "uploaded object found")

	uploadFileRandomData(ctx, t, repo, mainBranch, objPath2)
	f, err = found(ctx, repo, mainBranch, objPath2)
	require.NoError(t, err)
	require.True(t, f, "uploaded object found")

	// commit files
	commitResp, err := client.CommitWithResponse(ctx, repo, mainBranch, &apigen.CommitParams{}, apigen.CommitJSONRequestBody{
		Message: "resetObject",
	})
	require.NoError(t, err, "failed to commit changes")
	require.NoErrorf(t, verifyResponse(commitResp.HTTPResponse, commitResp.Body),
		"failed to commit changes repo %s branch %s", repo, mainBranch)

	// delete files
	deleteResp, err := client.DeleteObjectWithResponse(ctx, repo, mainBranch, &apigen.DeleteObjectParams{
		Path: objPath1,
	})
	require.NoError(t, err, "failed to delete file")
	require.NoErrorf(t, verifyResponse(deleteResp.HTTPResponse, deleteResp.Body),
		"failed to delete file %s repo %s branch %s", objPath1, repo, mainBranch)

	deleteResp, err = client.DeleteObjectWithResponse(ctx, repo, mainBranch, &apigen.DeleteObjectParams{
		Path: objPath2,
	})
	require.NoError(t, err, "failed to delete file")
	require.NoErrorf(t, verifyResponse(deleteResp.HTTPResponse, deleteResp.Body),
		"failed to delete file %s repo %s branch %s", objPath2, repo, mainBranch)

	// reset only file1
	reset := apigen.ResetCreation{
		Path: &objPath1,
		Type: "object",
	}
	resetResp, err := client.ResetBranchWithResponse(ctx, repo, mainBranch, apigen.ResetBranchJSONRequestBody(reset))
	require.NoError(t, err, "failed to reset")
	require.NoErrorf(t, verifyResponse(resetResp.HTTPResponse, resetResp.Body),
		"failed to reset object %s repo %s branch %s", objPath1, repo, mainBranch)

	// assert file1 exists
	getObjResp, err := client.GetObjectWithResponse(ctx, repo, mainBranch, &apigen.GetObjectParams{Path: objPath1})
	require.NoError(t, err, "failed to get object")
	require.NoErrorf(t, verifyResponse(getObjResp.HTTPResponse, getObjResp.Body),
		"failed to get object repo %s branch %s path %s", repo, mainBranch, objPath1)

	// assert file content
	body := string(getObjResp.Body)
	require.Equal(t, objContent1, body, fmt.Sprintf("path: %s, expected: %s, actual:%s", objPath1, objContent1, body))

	// assert file2 doesn't exists
	f, err = found(ctx, repo, mainBranch, objPath2)
	require.NoError(t, err)
	require.False(t, f, "object not found")
}