mobility-accounts/storage/storage_test.go

68 lines
1.2 KiB
Go
Raw Permalink Normal View History

package storage
import "github.com/google/uuid"
var account1 = Account{
ID: uuid.NewString(),
Namespace: "namespace",
Authentication: AccountAuth{
Local: &LocalAuth{
Username: Ptr("test"),
Password: "hashedpassword",
Email: Ptr("test@test.com"),
EmailValidation: &Validation{
Validated: true,
ValidationCode: "",
},
PhoneNumber: Ptr("+3312345678"),
PhoneNumberValidation: &Validation{
Validated: true,
ValidationCode: "",
},
},
},
Data: map[string]any{
"key1": "value1",
"key2": "value2",
},
Metadata: map[string]any{
"key1": "value1",
"key2": "value2",
},
}
var account2 = Account{
ID: uuid.NewString(),
Namespace: "test",
Authentication: AccountAuth{
Local: &LocalAuth{
Username: Ptr("test2"),
Password: "hashedpassword",
},
},
Data: map[string]any{
"key1": "value3",
"key2": "value4",
},
Metadata: map[string]any{
"key1": "value5",
"key2": "value6",
},
}
var account3 = Account{
ID: uuid.NewString(),
Namespace: "other_namespace",
Authentication: AccountAuth{
Local: nil,
},
Data: map[string]any{
"key1": "value3",
"key2": "value4",
},
Metadata: map[string]any{
"key1": "value5",
"key2": "value6",
},
}