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: system_e2e_test.go
    path of file: ./repos/mattermost/server/cmd/mmctl/commands
    
    the code of the file until where you have to start completion: // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package commands

import (
	"os"
	"strings"
	"time"

	"github.com/mattermost/mattermost/server/v8/cmd/mmctl/client"
	"github.com/mattermost/mattermost/server/v8/cmd/mmctl/printer"

	"github.com/mattermost/mattermost/server/public/model"
	"github.com/spf13/cobra"
)

func (s *MmctlE2ETestSuite) TestGetBusyCmd() {
	s.SetupEnterpriseTestHelper().InitBasic()

	s.th.App.Srv().Platform().Busy.Set(time.Minute)
	defer s.th.App.Srv().Platform().Busy.Clear()

	s.Run("MM-T3979 Should fail when regular user attempts to get server busy status", func() {
		printer.Clean()

		err := getBusyCmdF(s.th.Client, &cobra.Command{}, nil)
		s.Require().Error(err)
		s.Require().Len(printer.GetLines(), 0)
		s.Require().Len(printer.GetErrorLines(), 0)
	})

	s.RunForSystemAdminAndLocal("MM-T3956 Get server busy status", func(c client.Client) {
		printer.Clean()

		err := getBusyCmdF(c, &cobra.Command{}, nil)
		s.Require().NoError(err)
		s.Require().Len(printer.GetLines(), 1)
		state, ok := printer.GetLines()[0].(*model.ServerBusyState)
		s.Require().True(ok, true)
		s.Require().True(state.Busy, true)
		s.Require().Len(printer.GetErrorLines(), 0)
	})
}

func (s *MmctlE2ETestSuite) TestSetBusyCmd() {
	s.SetupEnterpriseTestHelper().InitBasic()

	s.th.App.Srv().Platform().Busy.Clear()
	cmd := &cobra.Command{}
	cmd.Flags().Uint("seconds", 60, "")

	s.Run("MM-T3980 Should fail when regular user 
    
func (s *MmctlE2ETestSuite) TestSupportPacketCmdF() {
	s.SetupEnterpriseTestHelper().InitBasic()

	printer.SetFormat(printer.FormatPlain)
	s.T().Cleanup(func() { printer.SetFormat(printer.FormatJSON) })

	s.Run("Download support packet with default filename", func() {
		printer.Clean()

		s.T().Cleanup(cleanupSupportPacket(s.T()))

		err := systemSupportPacketCmdF(s.th.SystemAdminClient, SystemSupportPacketCmd, []string{})
		s.Require().NoError(err)
		s.Require().Len(printer.GetLines(), 2)
		s.Require().Equal(printer.GetLines()[0], "Downloading Support Packet")
		s.Require().Contains(printer.GetLines()[1], "Downloaded Support Packet to ")
		s.Require().Len(printer.GetErrorLines(), 0)

		var found bool

		entries, err := os.ReadDir(".")
		s.Require().NoError(err)
		for _, e := range entries {
			if strings.HasPrefix(e.Name(), "mattermost_support_packet_") && strings.HasSuffix(e.Name(), ".zip") {
				b, err := os.ReadFile(e.Name())
				s.NoError(err)

				s.NotEmpty(b, b)

				found = true
			}
		}
		s.True(found)
	})

	s.Run("Download support packet with custom filename", func() {
		printer.Clean()

		err := SystemSupportPacketCmd.ParseFlags([]string{"-o", "foo.zip"})
		s.Require().NoError(err)

		s.T().Cleanup(func() {
			s.Require().NoError(os.Remove("foo.zip"))
		})

		err = systemSupportPacketCmdF(s.th.SystemAdminClient, SystemSupportPacketCmd, []string{})
		s.Require().NoError(err)
		s.Require().Len(printer.GetErrorLines(), 0)
		s.Require().Len(printer.GetLines(), 2)
		s.Require().Equal(printer.GetLines()[0], "Downloading Support Packet")
		s.Require().Equal(printer.GetLines()[1], "Downloaded Support Packet to foo.zip")

		b, err := os.ReadFile("foo.zip")
		s.Require().NoError(err)
		s.NotNil(b, b)
	})
}