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: open_archive_test.go
    path of file: ./repos/gitlabhq/workhorse/internal/zipartifacts
    
    the code of the file until where you have to start completion: package zipartifacts

import (
	"archive/zip"

    
func TestMinimalRangeRequests(t *testing.T) {
	dir := t.TempDir()
	entries, archiveSize := createArchive(t, dir)

	mux := http.NewServeMux()

	var ranges []string
	mux.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) {
		rangeHdr := r.Header.Get("Range")
		if rangeHdr == "" {
			rw.Header().Add("Content-Length", fmt.Sprintf("%d", archiveSize))
			return
		}

		ranges = append(ranges, rangeHdr)
		http.FileServer(http.Dir(dir)).ServeHTTP(rw, r)
	})

	srv := httptest.NewServer(mux)
	defer srv.Close()

	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	zr, err := OpenArchive(ctx, srv.URL+"/test.zip")
	require.NoError(t, err)
	require.Len(t, zr.File, len(entries))

	require.Len(t, ranges, 2, "range requests should be minimal")
	require.NotContains(t, ranges, "bytes=0-", "range request should not request from zero")

	for _, zf := range zr.File {
		r, err := zf.Open()
		require.NoError(t, err)

		_, err = io.Copy(io.Discard, r)
		require.NoError(t, err)

		require.NoError(t, r.Close())
	}

	// ensure minimal requests: https://gitlab.com/gitlab-org/gitlab/-/issues/340778
	require.Len(t, ranges, 3, "range requests should be minimal")
	require.Contains(t, ranges, "bytes=0-")
}