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: clusterfile_test.go
    path of file: ./repos/sealos/test/e2e/testhelper/config
    
    the code of the file until where you have to start completion: /*
Copyright 2023 cuisongliu@qq.com.

Licensed under the Apache L
    
func TestClusterfile_Write(t *testing.T) {
	type fields struct {
		BinData  string
		Replaces map[string]string
	}
	tests := []struct {
		name    string
		fields  fields
		wantErr bool
	}{
		{
			name: "default",
			fields: fields{
				BinData:  kubeadm.PackageName + "/containerd-svc-etcd.yaml",
				Replaces: map[string]string{"127.0.0.1": utils.GetLocalIpv4()},
			},
			wantErr: false,
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			c := &Clusterfile{
				BinData:  tt.fields.BinData,
				Replaces: tt.fields.Replaces,
			}
			got, err := c.Write()
			if (err != nil) != tt.wantErr {
				t.Errorf("Write() error = %v, wantErr %v", err, tt.wantErr)
				return
			}
			t.Log(got)
			_ = os.RemoveAll(got)
		})
	}
}