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: scheduler_test.go
    path of file: ./repos/gaia/workers/scheduler/gaiascheduler
    
    the code of the file until where you have to start completion: package gaiascheduler

import (
	"crypto/tls"
	"errors"
	"hash/fnv"
	"io/ioutil"
	"os/exec"
	"path/filepath"
	"sync"
	"testing"
	"time"

	"github.com/gaia-pipeline/gaia/workers/docker"

	"github.com/gaia-pipeline/gaia"
	"github.com/gaia-pipeline/gaia/plugin"
	"github.com/gaia-pipeline/gaia/security"
	"github.com/gaia-pipeline/gaia/store"
	"github.com/gofrs/uuid"
	"github.com/hashicorp/go-hclog"
)

type PluginFake struct{}

func (p *PluginFake) NewPlugin(ca security.CAAPI) plugin.Plugin { return &PluginFake{} }
func (p *PluginFake) Init(cmd *exec.Cmd, logPath *string) error { return nil }
func (p *PluginFake) Validate() error                           { return nil }
func (p *PluginFake) Execute(j *gaia.Job) error {
	j.Status = gaia.JobSuccess
	return nil
}
func (p *PluginFake) GetJobs() ([]*gaia.Job, error) { return prepareJobs(), nil }
func (p *PluginFake) FlushLogs() error              { return nil }
func (p *PluginFake) Close()              
    
func TestPrepareAndExecCppType(t *testing.T) {
	gaia.Cfg = &gaia.Config{}
	storeInstance := store.NewBoltStore()
	tmp, _ := ioutil.TempDir("", "TestPrepareAndExecCppType")
	gaia.Cfg.DataPath = tmp
	gaia.Cfg.WorkspacePath = filepath.Join(tmp, "tmp")
	gaia.Cfg.Bolt.Mode = 0600
	gaia.Cfg.Logger = hclog.New(&hclog.LoggerOptions{
		Level:  hclog.Trace,
		Output: hclog.DefaultOutput,
		Name:   "Gaia",
	})

	if err := storeInstance.Init(tmp); err != nil {
		t.Fatal(err)
	}
	p, r := prepareTestData()
	p.Type = gaia.PTypeCpp
	_ = storeInstance.PipelinePut(&p)
	s, err := NewScheduler(Dependencies{storeInstance, &MemDBFake{}, &PluginFake{}, &CAFake{}, &VaultFake{}})
	if err != nil {
		t.Fatal(err)
	}
	s.prepareAndExec(r)

	// get pipeline run from store
	run, err := storeInstance.PipelineGetRunByPipelineIDAndID(p.ID, r.ID)
	if err != nil {
		t.Fatal(err)
	}

	// jobs should be existent
	if len(run.Jobs) == 0 {
		t.Fatal("No jobs in pipeline run found.")
	}

	// Iterate jobs
	for _, job := range run.Jobs {
		if job.Status != gaia.JobSuccess {
			t.Fatalf("job status should be success but was %s", string(job.Status))
		} else {
			t.Logf("Job %s has been executed...", job.Title)
		}
	}
}