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

import (
	"context"
	"net/http/httptest"
	"testing"
	"time"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"

	"github.com/coder/coder/v2/codersdk"
)

func Test_parseInsightsStartAndEndTime(t *testing.T) {
	t.Parallel()

	t.Logf("machine location: %s", time.Now().Location())
	layout := insightsTimeLayout
	now := time.Now().UTC()
	t.Logf("now: %s", now)
	t.Logf("now location: %s", now.Location())
	y, m, d := now.Date()
	today := time.Date(y, m, d, 0, 0, 0, 0, time.UTC)
	t.Logf("today: %s", today)
	thisHour := time.Date(y, m, d, now.Hour(), 0, 0, 0, time.UTC)
	t.Logf("thisHour: %s", thisHour)
	thisHourRoundUp := thisHour.Add(time.Hour)
	t.Logf("thisHourRoundUp: %s"
    
func Test_parseInsightsInterval_week(t *testing.T) {
	t.Parallel()

	layout := insightsTimeLayout
	sydneyLoc, err := time.LoadLocation("Australia/Sydney") // Random location
	require.NoError(t, err)

	now := time.Now().In(sydneyLoc)
	t.Logf("now: %s", now)

	y, m, d := now.Date()
	today := time.Date(y, m, d, 0, 0, 0, 0, sydneyLoc)
	t.Logf("today: %s", today)

	thisHour := time.Date(y, m, d, now.Hour(), 0, 0, 0, sydneyLoc)
	t.Logf("thisHour: %s", thisHour)
	twoHoursAgo := thisHour.Add(-2 * time.Hour)
	t.Logf("twoHoursAgo: %s", twoHoursAgo)
	thirteenDaysAgo := today.AddDate(0, 0, -13)
	t.Logf("thirteenDaysAgo: %s", thirteenDaysAgo)

	sixDaysAgo := today.AddDate(0, 0, -6)
	t.Logf("sixDaysAgo: %s", sixDaysAgo)
	nineDaysAgo := today.AddDate(0, 0, -9)
	t.Logf("nineDaysAgo: %s", nineDaysAgo)

	type args struct {
		startTime string
		endTime   string
	}
	tests := []struct {
		name   string
		args   args
		wantOk bool
	}{
		{
			name: "Two full weeks",
			args: args{
				startTime: "2023-08-10T00:00:00+02:00",
				endTime:   "2023-08-24T00:00:00+02:00",
			},
			wantOk: true,
		},
		{
			name: "One full week",
			args: args{
				startTime: "2023-09-06T00:00:00+02:00",
				endTime:   "2023-09-13T00:00:00+02:00",
			},
			wantOk: true,
		},
		{
			name: "6 days are acceptable",
			args: args{
				startTime: sixDaysAgo.Format(layout),
				endTime:   stripTime(thisHour).Format(layout),
			},
			wantOk: true,
		},
		{
			name: "Shorter than a full week",
			args: args{
				startTime: "2023-09-08T00:00:00+02:00",
				endTime:   "2023-09-13T00:00:00+02:00",
			},
			wantOk: false,
		},
		{
			name: "9 days (7 + 2) are not acceptable",
			args: args{
				startTime: nineDaysAgo.Format(layout),
				endTime:   stripTime(thisHour).Format(layout),
			},
			wantOk: false,
		},
	}
	for _, tt := range tests {
		tt := tt

		t.Run(tt.name, func(t *testing.T) {
			t.Parallel()

			t.Log("startTime: ", tt.args.startTime)
			t.Log("endTime: ", tt.args.endTime)

			rw := httptest.NewRecorder()
			startTime, endTime, ok := parseInsightsStartAndEndTime(context.Background(), rw, now, tt.args.startTime, tt.args.endTime)
			if !ok {
				//nolint:bodyclose
				t.Log("Status: ", rw.Result().StatusCode)
				t.Log("Body: ", rw.Body.String())
			}
			require.True(t, ok, "start_time and end_time must be valid")

			parsedInterval, gotOk := parseInsightsInterval(context.Background(), rw, "week", startTime, endTime)
			if !assert.Equal(t, tt.wantOk, gotOk) {
				//nolint:bodyclose
				t.Log("Status: ", rw.Result().StatusCode)
				t.Log("Body: ", rw.Body.String())
				return
			}
			if tt.wantOk {
				assert.Equal(t, codersdk.InsightsReportIntervalWeek, parsedInterval)
			}
		})
	}
}