Fixed SPN HUB using wrong instance

This commit is contained in:
Natanael Rodriguez Ramos
2025-04-10 17:07:48 +01:00
parent 90ce30e842
commit d828aacd0f
3 changed files with 17 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ func (stub *testInstance) Stopping() bool {
func (stub *testInstance) SetCmdLineOperation(f func() error) {}
func runTest(m *testing.M) error {
_ = log.Start()
_ = log.Start("info", true, "")
ds, err := config.InitializeUnitTestDataroot("test-docks")
if err != nil {

View File

@@ -508,6 +508,21 @@ func (i *Instance) ExitCode() int {
return int(i.exitCode.Load())
}
// ShouldRestartIsSet returns whether the service/instance should be restarted.
func (i *Instance) ShouldRestartIsSet() bool {
return i.ShouldRestart
}
// CommandLineOperationIsSet returns whether the command line option is set.
func (i *Instance) CommandLineOperationIsSet() bool {
return i.CommandLineOperation != nil
}
// CommandLineOperationExecute executes the set command line option.
func (i *Instance) CommandLineOperationExecute() error {
return i.CommandLineOperation()
}
// SPNGroup fakes interface conformance.
// SPNGroup is only needed on SPN clients.
func (i *Instance) SPNGroup() *mgr.ExtendedGroup {

View File

@@ -14,4 +14,4 @@ cat /opt/shared/config-template.json | sed "s/\$HUBNAME/$HUBNAME/g" > /opt/data/
BIN=$(ls /opt/ | grep hub)
# Start Hub.
/opt/$BIN --data /opt/data --log trace --spn-map test --bootstrap-file /opt/shared/bootstrap.dsd --api-address 0.0.0.0:817 --devmode
/opt/$BIN --log trace --spn-map test --bootstrap-file /opt/shared/bootstrap.dsd --api-address 0.0.0.0:817 --devmode