@@ -28,6 +28,7 @@ import (
2828 "path/filepath"
2929 reflect "reflect"
3030 "regexp"
31+ "runtime"
3132 "slices"
3233 "strconv"
3334 "strings"
@@ -1247,10 +1248,7 @@ func (s *server) CreateStore(ctx context.Context, in *Store) (reply *Store, err
12471248 storeFactory := testing .NewStoreFactory (s .configDir )
12481249 store := ToNormalStore (in )
12491250
1250- if store .Kind .URL == "" {
1251- store .Kind .URL = fmt .Sprintf ("unix://%s" , home .GetExtensionSocketPath (store .Kind .Name ))
1252- }
1253-
1251+ handleStore (& store )
12541252 if err = storeFactory .CreateStore (store ); err == nil && s .storeExtMgr != nil {
12551253 err = s .storeExtMgr .Start (store .Kind .Name , store .Kind .URL )
12561254 }
@@ -1260,6 +1258,7 @@ func (s *server) UpdateStore(ctx context.Context, in *Store) (reply *Store, err
12601258 reply = & Store {}
12611259 storeFactory := testing .NewStoreFactory (s .configDir )
12621260 store := ToNormalStore (in )
1261+ handleStore (& store )
12631262 if err = storeFactory .UpdateStore (store ); err == nil && s .storeExtMgr != nil {
12641263 // TODO need to restart extension if config was changed
12651264 err = s .storeExtMgr .Start (store .Kind .Name , store .Kind .URL )
@@ -1276,14 +1275,21 @@ func (s *server) VerifyStore(ctx context.Context, in *SimpleQuery) (reply *Exten
12761275 reply = & ExtensionStatus {}
12771276 var loader testing.Writer
12781277 if loader , err = s .getLoaderByStoreName (in .Name ); err == nil && loader != nil {
1279- readOnly , verifyErr := loader .Verify ()
1278+ readOnly , version , verifyErr := loader .Verify ()
12801279 reply .Ready = verifyErr == nil
1280+ reply .Version = version
12811281 reply .ReadOnly = readOnly
12821282 reply .Message = util .OKOrErrorMessage (verifyErr )
12831283 }
12841284 return
12851285}
12861286
1287+ func handleStore (store * testing.Store ) {
1288+ if store .Kind .URL == "" && runtime .GOOS != "windows" {
1289+ store .Kind .URL = fmt .Sprintf ("unix://%s" , home .GetExtensionSocketPath (store .Kind .Name ))
1290+ }
1291+ }
1292+
12871293// secret related interfaces
12881294func (s * server ) GetSecrets (ctx context.Context , in * Empty ) (reply * Secrets , err error ) {
12891295 return s .secretServer .GetSecrets (ctx , in )
0 commit comments