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: model_test.go
    path of file: ./repos/bk-cmdb/src/source_controller/coreservice/core/model
    
    the code of the file until where you have to start completion: /*
 * Tencent is pleased to support the open source community by making 蓝鲸 available.,
 * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
 * Licensed under the MIT License (the ",License",); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * http://opensource.org/licenses/MIT
 * Unless required by applicable law or agreed to in writing, software distributed under
 *
    
func TestSearchAndDeleteModel(t *testing.T) {

	modelMgr := newModel(t)
	inputModel := metadata.CreateModel{}
	// create a valid model with a valid classificationID
	classificationID := xid.New().String()
	result, err := modelMgr.CreateOneModelClassification(defaultCtx, metadata.CreateOneModelClassification{
		Data: metadata.Classification{
			ClassificationID:   classificationID,
			ClassificationName: "test_classification_name_to_test_create_model",
		},
	})
	require.NoError(t, err)
	require.NotEqual(t, uint64(0), result.Created.ID)

	inputModel.Spec.ObjCls = classificationID
	inputModel.Spec.ObjectName = "delete_create_model"
	inputModel.Spec.ObjectID = xid.New().String()
	inputModel.Attributes = []metadata.Attribute{
		metadata.Attribute{
			ObjectID:     inputModel.Spec.ObjectID,
			PropertyID:   xid.New().String(),
			PropertyName: xid.New().String(),
		},
	}

	dataResult, err := modelMgr.CreateModel(defaultCtx, inputModel)
	require.NoError(t, err)
	require.NotNil(t, dataResult)
	require.NotEqual(t, uint64(0), dataResult.Created.ID)

	// search the created one
	searchResult, err := modelMgr.SearchModelWithAttribute(defaultCtx, metadata.QueryCondition{
		Condition: mapstr.MapStr{
			metadata.ModelFieldObjectID: mapstr.MapStr{
				"$regex": inputModel.Spec.ObjectID,
			},
		},
	})
	require.NoError(t, err)
	require.NotNil(t, searchResult)
	require.Equal(t, int64(1), searchResult.Count)
	require.Equal(t, searchResult.Count, int64(len(searchResult.Info)))
	resultStr, _ := json.Marshal(searchResult)
	t.Logf("the query result:%s", resultStr)

	// search delete the one
	deleteResult, err := modelMgr.DeleteModel(defaultCtx, metadata.DeleteOption{
		Condition: mapstr.MapStr{
			metadata.ModelFieldObjectID: mapstr.MapStr{
				"$regex": inputModel.Spec.ObjectID,
			},
		},
	})

	require.NoError(t, err)
	require.NotNil(t, deleteResult)
	require.Equal(t, uint64(1), deleteResult.Count)

	// search the created one
	searchResult, err = modelMgr.SearchModelWithAttribute(defaultCtx, metadata.QueryCondition{
		Condition: mapstr.MapStr{
			metadata.ModelFieldObjectID: mapstr.MapStr{
				"$regex": inputModel.Spec.ObjectID,
			},
		},
	})
	require.NoError(t, err)
	require.NotNil(t, searchResult)
	require.Equal(t, int64(0), searchResult.Count)
	require.Equal(t, searchResult.Count, int64(len(searchResult.Info)))
}