package orchestrationapi
+//$
import (
- "testing"
- "time"
- "os/exec"
- "fmt"
+ "discoverymgr"
+ "fmt"
+ "os/exec"
+ "testing"
+ "time"
- configuremgr "configuremgr"
- confdescription "configuremgr/description"
+ configuremgr "configuremgr"
+ confdescription "configuremgr/description"
- // mockconfiguremgr "configuremgr/mock"
+ // mockconfiguremgr "configuremgr/mock"
- scoringmgr "scoringmgr"
- mockscoringmgr "scoringmgr/mock"
-
- // discoverymgr "discoverymgr"
- servicemgr "servicemgr"
+ scoringmgr "scoringmgr"
+ mockscoringmgr "scoringmgr/mock"
+ // discoverymgr "discoverymgr"
+ servicemgr "servicemgr"
)
-
//jaehoon.hyun , jaehoon.hyun
-func TestConfigureMgrScoringMgr(t *testing.T){
+func TestConfigureMgrScoringMgr(t *testing.T) {
+
+ //make orche
+ orcheMock := Init("")
+
+ //create modules
+ orcheMock.IScoringmgr = scoringmgr.Init()
+ orcheMock.IConfiguremgr = configuremgr.Init()
+
+ //scoringmgr interface
+ orcheMock.IScoringmgr.IRunningScore = mockscoringmgr.LoadScoringInterfaceAdd
+ orcheMock.IScoringmgr.IStartResourceService = mockscoringmgr.StartResourceServiceAdd
+ orcheMock.IScoringmgr.IStopResourceService = mockscoringmgr.StopResourceServiceAdd
+ orcheMock.IScoringmgr.IGetScore = mockscoringmgr.GetScoreRandom100Mock
+ orcheMock.IScoringmgr.Ch = make(chan interface{}, 1024)
+ //configuremgr interface
+ orcheMock.IConfiguremgr.IDiscoveryMgr.PushConfPath = PushConfPathDiscoveryDeviceMock
+ orcheMock.IConfiguremgr.IScoringMgr.PushLibPath = scoringmgr.PushLibPath
+ orcheMock.IConfiguremgr.IScoringMgr.Ch = orcheMock.IScoringmgr.Ch
+
+ //discoverymgr interface
+ orcheMock.IDiscoverymgr.GetEndpointDevices = GetEndpointDevicesMock
+
+ //servicemgr interface
+ orcheMock.IServicemgr.ExecuteApp = ExecuteAppMock
+
+ //start scoringmgr
+ orcheMock.IScoringmgr.Listening()
+ orcheMock.IScoringmgr.IStartResourceService()
+
+ //start configuremgr
+ go orcheMock.IConfiguremgr.Watch("/tmp/foo")
+
+ //init scenario
+ execCommand("rm -rf /tmp/foo/mysum")
+ time.Sleep(time.Duration(1) * time.Second)
+
+ //user scenario
+ execCommand(fmt.Sprintf("cp -arR %s %s", "./mock/mysum/", "/tmp/foo"))
+ time.Sleep(time.Duration(3) * time.Second)
+
+ //release scoringmgr
+ orcheMock.IScoringmgr.IStopResourceService()
+ orcheMock.IScoringmgr.RemoveLib("ls")
+
+ //release configuremgr
+ orcheMock.IConfiguremgr.Done <- true
+
+}
+
+func TestConfigureMgrScoringMgrMyScoringLib(t *testing.T) {
+
+ //make orche
+ orcheMock := new(Orche)
+
+ //create modules
+ orcheMock.IScoringmgr = scoringmgr.Init()
+ orcheMock.IConfiguremgr = configuremgr.Init()
- //make orche
- orcheMock := new(Orche)
+ //scoringmgr interface
+ orcheMock.IScoringmgr.IRunningScore = scoringmgr.LoadScoringGeneralInterface
+ orcheMock.IScoringmgr.IStartResourceService = scoringmgr.StartResourceService
+ orcheMock.IScoringmgr.IStopResourceService = scoringmgr.StopResourceService
+ orcheMock.IScoringmgr.IGetScore = mockscoringmgr.GetScoreRandom100Mock
+ orcheMock.IScoringmgr.Ch = make(chan interface{}, 1024)
- orcheMock.IScoringmgr = scoringmgr.Init()
- orcheMock.IConfiguremgr = configuremgr.Init()
+ //configuremgr interface
+ orcheMock.IConfiguremgr.IDiscoveryMgr.PushConfPath = PushConfPathDiscoveryDeviceMock
+ orcheMock.IConfiguremgr.IScoringMgr.PushLibPath = scoringmgr.PushLibPath
+ orcheMock.IConfiguremgr.IScoringMgr.Ch = orcheMock.IScoringmgr.Ch
- orcheMock.IScoringmgr.IRunningScore = mockscoringmgr.LoadScoringAddInterface
- orcheMock.IScoringmgr.IGetScore = mockscoringmgr.GetScoreRandom100Mock
- orcheMock.IScoringmgr.Ch = make(chan interface{}, 1024)
+ //discoverymgr interface
+ orcheMock.IDiscoverymgr.GetEndpointDevices = GetEndpointDevicesMock
- orcheMock.IConfiguremgr.IDiscoveryMgr.PushConfPath = pushConfPathDiscoveryDeviceMock
- orcheMock.IConfiguremgr.IScoringMgr.PushLibPath = scoringmgr.PushLibPath
- orcheMock.IConfiguremgr.IScoringMgr.Ch = orcheMock.IScoringmgr.Ch
+ //servicemgr interface
+ orcheMock.IServicemgr.ExecuteApp = ExecuteAppMock
- orcheMock.IDiscoverymgr.GetEndpointDevices = getEndpointDevicesMock
- orcheMock.IServicemgr.ExecuteApp = executeAppMock
+ //start scoringmgr
+ orcheMock.IScoringmgr.Listening()
+ orcheMock.IScoringmgr.IStartResourceService()
+ //start configuremgr
+ go orcheMock.IConfiguremgr.Watch("/tmp/foo")
- //start module function
- orcheMock.IScoringmgr.Listening()
- go orcheMock.IConfiguremgr.Watch("/tmp/foo")
-
- //init scenario
- execCommand("rm -rf /tmp/foo/mysum")
- time.Sleep(time.Duration(1) * time.Second)
+ //init scenario
+ execCommand("rm -rf /tmp/foo/myscoring")
+ time.Sleep(time.Duration(1) * time.Second)
- //user scenario
- execCommand(fmt.Sprintf("cp -ar %s %s", "./mock/mysum/", "/tmp/foo"))
- time.Sleep(time.Duration(3) * time.Second)
+ //user scenario
+ execCommand(fmt.Sprintf("cp -arR %s %s", "./mock/myscoring/", "/tmp/foo"))
+ time.Sleep(time.Duration(3) * time.Second)
- //resource release
- orcheMock.IScoringmgr.RemoveLib("mysum")
- orcheMock.IConfiguremgr.Done <- true
+ //release scoringmgr
+ orcheMock.IScoringmgr.IStopResourceService()
+ orcheMock.IScoringmgr.RemoveLib("ls")
+ //release configuremgr
+ orcheMock.IConfiguremgr.Done <- true
}
//jaehoon.hyun, damon92-lee
func TestConfigureMgrDiscoveryMgr(t *testing.T) {
+ orcheMock := Init("")
-}
+ orcheMock.IScoringmgr = scoringmgr.Init()
+ orcheMock.IConfiguremgr = configuremgr.Init()
-//jaehoon.hyun, chacha
-func TestRequestServiceFunctionServiceMgr(t *testing.T){
+ orcheMock.IScoringmgr.IRunningScore = mockscoringmgr.LoadScoringInterfaceAdd
+ orcheMock.IScoringmgr.IStartResourceService = mockscoringmgr.StartResourceServiceAdd
+ orcheMock.IScoringmgr.IStopResourceService = mockscoringmgr.StopResourceServiceAdd
+ orcheMock.IScoringmgr.IGetScore = mockscoringmgr.GetScoreRandom100Mock
+ orcheMock.IScoringmgr.Ch = make(chan interface{}, 1024)
- orcheMock := Init("")
+ orcheMock.IConfiguremgr.IDiscoveryMgr.PushConfPath = discoverymgr.AddNewServiceName
+ orcheMock.IConfiguremgr.IScoringMgr.PushLibPath = scoringmgr.PushLibPath
+ orcheMock.IConfiguremgr.IScoringMgr.Ch = orcheMock.IScoringmgr.Ch
- orcheMock.IScoringmgr = scoringmgr.Init()
- orcheMock.IConfiguremgr = configuremgr.Init()
+ orcheMock.IDiscoverymgr.GetEndpointDevices = discoverymgr.GetDeviceListWithService
+ orcheMock.IServicemgr.ExecuteApp = ExecuteAppMock
- orcheMock.IScoringmgr.IRunningScore = mockscoringmgr.LoadScoringAddInterface
- orcheMock.IScoringmgr.IGetScore = mockscoringmgr.GetScoreRandom100Mock
- orcheMock.IScoringmgr.Ch = make(chan interface{}, 1024)
+ discoverymgr.InitDiscovery()
- orcheMock.IConfiguremgr.IDiscoveryMgr.PushConfPath = pushConfPathDiscoveryDeviceMock
- orcheMock.IConfiguremgr.IScoringMgr.PushLibPath = scoringmgr.PushLibPath
- orcheMock.IConfiguremgr.IScoringMgr.Ch = orcheMock.IScoringmgr.Ch
+ //scoringmgr init
+ orcheMock.IScoringmgr.Listening()
- orcheMock.IDiscoverymgr.GetEndpointDevices = getEndpointDevicesMock
- orcheMock.IServicemgr.ExecuteApp = servicemgr.ExecuteApp
+ //configuremgr init
+ go orcheMock.IConfiguremgr.Watch("/tmp/foo")
+ //init scenario
+ execCommand("rm -rf /tmp/foo/mysum")
+ time.Sleep(time.Duration(1) * time.Second)
- //scoringmgr init
- orcheMock.IScoringmgr.Listening()
+ //user scenario
+ execCommand(fmt.Sprintf("cp -ar %s %s", "./mock/mysum/", "/tmp/foo"))
+ time.Sleep(time.Duration(3) * time.Second)
+ RequestService("ls", []string{"-al"})
- //configuremgr init
- go orcheMock.IConfiguremgr.Watch("/tmp/foo")
+ //resource release
+ time.Sleep(time.Duration(1) * time.Second)
+ orcheMock.IScoringmgr.RemoveLib("ls")
+ orcheMock.IConfiguremgr.Done <- true
+ discoverymgr.ExitChan <- 1
+}
- //servicemgr init
- servicemgr.InitServiceMap()
+//jaehoon.hyun, chacha
+func TestRequestServiceFunctionServiceMgr(t *testing.T) {
-
- //init scenario
- execCommand("rm -rf /tmp/foo/mysum")
- time.Sleep(time.Duration(1) * time.Second)
+ orcheMock := Init("")
- //user scenario
- execCommand(fmt.Sprintf("cp -ar %s %s", "./mock/mysum/", "/tmp/foo"))
- time.Sleep(time.Duration(3) * time.Second)
- RequestService("mysum", "ls", []string{"-al"})
+ orcheMock.IScoringmgr = scoringmgr.Init()
+ orcheMock.IConfiguremgr = configuremgr.Init()
+ orcheMock.IScoringmgr.IRunningScore = mockscoringmgr.LoadScoringInterfaceAdd
+ orcheMock.IScoringmgr.IStartResourceService = mockscoringmgr.StartResourceServiceAdd
+ orcheMock.IScoringmgr.IStopResourceService = mockscoringmgr.StopResourceServiceAdd
+ orcheMock.IScoringmgr.IGetScore = mockscoringmgr.GetScoreRandom100Mock
+ orcheMock.IScoringmgr.Ch = make(chan interface{}, 1024)
- //resource release
- time.Sleep(time.Duration(1) * time.Second)
- orcheMock.IScoringmgr.RemoveLib("mysum")
- orcheMock.IConfiguremgr.Done <- true
+ orcheMock.IConfiguremgr.IDiscoveryMgr.PushConfPath = PushConfPathDiscoveryDeviceMock
+ orcheMock.IConfiguremgr.IScoringMgr.PushLibPath = scoringmgr.PushLibPath
+ orcheMock.IConfiguremgr.IScoringMgr.Ch = orcheMock.IScoringmgr.Ch
- for {}
-}
+ orcheMock.IDiscoverymgr.GetEndpointDevices = GetEndpointDevicesMock
+ orcheMock.IServicemgr.ExecuteApp = servicemgr.ExecuteApp
-//daemon92-lee, chacha
-func TestDiscoveryMgrServiceMgr(t *testing.T){
+ //scoringmgr init
+ orcheMock.IScoringmgr.Listening()
+
+ //configuremgr init
+ go orcheMock.IConfiguremgr.Watch("/tmp/foo")
+
+ //servicemgr init
+ servicemgr.Init()
+
+ //init scenario
+ execCommand("rm -rf /tmp/foo/mysum")
+ time.Sleep(time.Duration(1) * time.Second)
+ //user scenario
+ execCommand(fmt.Sprintf("cp -ar %s %s", "./mock/mysum/", "/tmp/foo"))
+ time.Sleep(time.Duration(3) * time.Second)
+ RequestService("ls", []string{"-al"})
+ //resource release
+ time.Sleep(time.Duration(1) * time.Second)
+ orcheMock.IScoringmgr.RemoveLib("ls")
+ orcheMock.IConfiguremgr.Done <- true
+
+}
+
+//daemon92-lee, chacha
+func testDiscoveryMgrServiceMgr(t *testing.T) {
+ // @TODO
}
//jaehoon.hyun, daemon92-lee, jaehoon.hyun
-func TestConfigureMgrDiscoveryMgrScoringMgr(t *testing.T){
+func TestConfigureMgrDiscoveryMgrScoringMgr(t *testing.T) {
+ orcheMock := Init("")
+
+ orcheMock.IScoringmgr = scoringmgr.Init()
+ orcheMock.IConfiguremgr = configuremgr.Init()
+
+ orcheMock.IScoringmgr.IRunningScore = mockscoringmgr.LoadScoringInterfaceAdd
+ orcheMock.IScoringmgr.IStartResourceService = mockscoringmgr.StartResourceServiceAdd
+ orcheMock.IScoringmgr.IStopResourceService = mockscoringmgr.StopResourceServiceAdd
+ orcheMock.IScoringmgr.IGetScore = scoringmgr.GetScore
+ orcheMock.IScoringmgr.Ch = make(chan interface{}, 1024)
+
+ orcheMock.IConfiguremgr.IDiscoveryMgr.PushConfPath = discoverymgr.AddNewServiceName
+ orcheMock.IConfiguremgr.IScoringMgr.PushLibPath = scoringmgr.PushLibPath
+ orcheMock.IConfiguremgr.IScoringMgr.Ch = orcheMock.IScoringmgr.Ch
+
+ orcheMock.IDiscoverymgr.GetEndpointDevices = discoverymgr.GetDeviceListWithService
+ orcheMock.IServicemgr.ExecuteApp = ExecuteAppMock
+ //scoringmgr init
+ orcheMock.IScoringmgr.Listening()
+
+ //configuremgr init
+ go orcheMock.IConfiguremgr.Watch("/tmp/foo")
+
+ //init scenario
+ execCommand("rm -rf /tmp/foo/mysum")
+ time.Sleep(time.Duration(1) * time.Second)
+
+ discoverymgr.InitDiscovery()
+
+ //user scenario
+ execCommand(fmt.Sprintf("cp -ar %s %s", "../scoringmgr/mock/mysum/", "/tmp/foo"))
+ time.Sleep(time.Duration(3) * time.Second)
+ RequestService("ls", []string{"-al"})
+
+ //resource release
+ time.Sleep(time.Duration(1) * time.Second)
+ orcheMock.IScoringmgr.RemoveLib("ls")
+ orcheMock.IConfiguremgr.Done <- true
+ discoverymgr.ExitChan <- 1
}
//jaehoon.hyun, daemon92-lee, chacha
-func TestConfigureMgrDiscoveryMgrServiceMgr(t *testing.T){
+func TestConfigureMgrDiscoveryMgrServiceMgr(t *testing.T) {
+ orcheMock := Init("")
+
+ orcheMock.IScoringmgr = scoringmgr.Init()
+ orcheMock.IConfiguremgr = configuremgr.Init()
+
+ orcheMock.IScoringmgr.IRunningScore = mockscoringmgr.LoadScoringInterfaceAdd
+ orcheMock.IScoringmgr.IStartResourceService = mockscoringmgr.StartResourceServiceAdd
+ orcheMock.IScoringmgr.IStopResourceService = mockscoringmgr.StopResourceServiceAdd
+ orcheMock.IScoringmgr.IGetScore = mockscoringmgr.GetScoreRandom100Mock
+ orcheMock.IScoringmgr.Ch = make(chan interface{}, 1024)
+
+ orcheMock.IConfiguremgr.IDiscoveryMgr.PushConfPath = discoverymgr.AddNewServiceName
+ orcheMock.IConfiguremgr.IScoringMgr.PushLibPath = scoringmgr.PushLibPath
+ orcheMock.IConfiguremgr.IScoringMgr.Ch = orcheMock.IScoringmgr.Ch
+
+ orcheMock.IDiscoverymgr.GetEndpointDevices = discoverymgr.GetDeviceListWithService
+ orcheMock.IServicemgr.ExecuteApp = servicemgr.ExecuteApp
+ discoverymgr.InitDiscovery()
+ servicemgr.Init()
+
+ //scoringmgr init
+ orcheMock.IScoringmgr.Listening()
+
+ //init scenario
+ execCommand("rm -rf /tmp/foo/mysum")
+ time.Sleep(time.Duration(1) * time.Second)
+
+ //configuremgr init
+ go orcheMock.IConfiguremgr.Watch("/tmp/foo")
+
+ //user scenario
+ execCommand(fmt.Sprintf("cp -ar %s %s", "./mock/mysum/", "/tmp/foo"))
+ time.Sleep(time.Duration(3) * time.Second)
+ RequestService("ls", []string{"-al"})
+
+ //resource release
+ time.Sleep(time.Duration(1) * time.Second)
+ orcheMock.IScoringmgr.RemoveLib("ls")
+ orcheMock.IConfiguremgr.Done <- true
+ discoverymgr.ExitChan <- 1
}
//jaehoon.hyun, chacha, jaehoon.hyun
-func TestConfigureMgrServiceMgrScoringMgr(t *testing.T){
+func TestConfigureMgrServiceMgrScoringMgr(t *testing.T) {
+ orcheMock := Init("")
+
+ orcheMock.IScoringmgr = scoringmgr.Init()
+ orcheMock.IConfiguremgr = configuremgr.Init()
+
+ orcheMock.IScoringmgr.IRunningScore = mockscoringmgr.LoadScoringInterfaceAdd
+ orcheMock.IScoringmgr.IStartResourceService = mockscoringmgr.StartResourceServiceAdd
+ orcheMock.IScoringmgr.IStopResourceService = mockscoringmgr.StopResourceServiceAdd
+ orcheMock.IScoringmgr.IGetScore = scoringmgr.GetScore
+ orcheMock.IScoringmgr.Ch = make(chan interface{}, 1024)
+
+ orcheMock.IConfiguremgr.IDiscoveryMgr.PushConfPath = PushConfPathDiscoveryDeviceMock
+ orcheMock.IConfiguremgr.IScoringMgr.PushLibPath = scoringmgr.PushLibPath
+ orcheMock.IConfiguremgr.IScoringMgr.Ch = orcheMock.IScoringmgr.Ch
+ orcheMock.IDiscoverymgr.GetEndpointDevices = GetEndpointDevicesMock
+ orcheMock.IServicemgr.ExecuteApp = servicemgr.ExecuteApp
+
+ //scoringmgr init
+ orcheMock.IScoringmgr.Listening()
+
+ //configuremgr init
+ go orcheMock.IConfiguremgr.Watch("/tmp/foo")
+
+ //init scenario
+ execCommand("rm -rf /tmp/foo/mysum")
+ time.Sleep(time.Duration(1) * time.Second)
+
+ servicemgr.Init()
+
+ //user scenario
+ execCommand(fmt.Sprintf("cp -ar %s %s", "./mock/mysum/", "/tmp/foo"))
+ time.Sleep(time.Duration(3) * time.Second)
+ RequestService("ls", []string{"-al"})
+
+ //resource release
+ time.Sleep(time.Duration(1) * time.Second)
+ orcheMock.IScoringmgr.RemoveLib("ls")
+ orcheMock.IConfiguremgr.Done <- true
}
//jaehoon.hyun, daemon92-lee, chacha, jaehoon.hyun
-func TestConfigureMgrDiscoveryMgrScoringMgrServiceMgr(t *testing.T){
+func TestConfigureMgrDiscoveryMgrScoringMgrServiceMgr(t *testing.T) {
+ orcheMock := Init("")
+ orcheMock.IScoringmgr = scoringmgr.Init()
+ orcheMock.IConfiguremgr = configuremgr.Init()
-}
+ orcheMock.IScoringmgr.IRunningScore = mockscoringmgr.LoadScoringInterfaceAdd
+ orcheMock.IScoringmgr.IStartResourceService = mockscoringmgr.StartResourceServiceAdd
+ orcheMock.IScoringmgr.IStopResourceService = mockscoringmgr.StopResourceServiceAdd
+ orcheMock.IScoringmgr.IGetScore = scoringmgr.GetScore
+ orcheMock.IScoringmgr.Ch = make(chan interface{}, 1024)
+
+ orcheMock.IConfiguremgr.IDiscoveryMgr.PushConfPath = discoverymgr.AddNewServiceName
+ orcheMock.IConfiguremgr.IScoringMgr.PushLibPath = scoringmgr.PushLibPath
+ orcheMock.IConfiguremgr.IScoringMgr.Ch = orcheMock.IScoringmgr.Ch
+ orcheMock.IDiscoverymgr.GetEndpointDevices = discoverymgr.GetDeviceListWithService
+ orcheMock.IServicemgr.ExecuteApp = servicemgr.ExecuteApp
+
+ //scoringmgr init
+ orcheMock.IScoringmgr.Listening()
+
+ //configuremgr init
+ go orcheMock.IConfiguremgr.Watch("/tmp/foo")
+
+ //init scenario
+ execCommand("rm -rf /tmp/foo/mysum")
+ time.Sleep(time.Duration(1) * time.Second)
+
+ discoverymgr.InitDiscovery()
+ servicemgr.Init()
+
+ //user scenario
+ execCommand(fmt.Sprintf("cp -ar %s %s", "./mock/mysum/", "/tmp/foo"))
+ time.Sleep(time.Duration(3) * time.Second)
+ RequestService("ls", []string{"-al"})
+
+ //resource release
+ time.Sleep(time.Duration(1) * time.Second)
+ orcheMock.IScoringmgr.RemoveLib("ls")
+ orcheMock.IConfiguremgr.Done <- true
+ discoverymgr.ExitChan <- 1
-func pushConfPathDiscoveryDeviceMock (doc *confdescription.Doc) (err error) {
- ILog.Println("pushConfPathDiscoveryDeviceMock")
- ILog.Println(*doc)
- return
}
-func pushLibPathScoringAppMock(libPath string, doc *confdescription.Doc, handlersCh chan<- interface{}) (err error) {
- ILog.Println("pushLibPathScoringAppMock")
- ILog.Println(libPath)
- return
+func PushConfPathDiscoveryDeviceMock(doc *confdescription.Doc) (err error) {
+ ILog.Println("pushConfPathDiscoveryDeviceMock")
+ ILog.Println(*doc)
+ return
}
-func getEndpointDevicesMock(serviceName string) []string {
- DLog.Printf("getEndpointDevicesMock serviceName: %s\n", serviceName)
- return []string{"localhost", "localhost"}
+func PushLibPathScoringAppMock(libPath string, doc *confdescription.Doc, handlersCh chan<- interface{}) (err error) {
+ ILog.Println("pushLibPathScoringAppMock")
+ ILog.Println(libPath)
+ return
}
-func executeAppMock(target string, name string, args []string, notiChan chan string) (serviceID uint64, err error) {
- ILog.Println("ExecuteApp")
- ILog.Println(target)
- ILog.Println(name)
- ILog.Println(args)
- return
+func GetEndpointDevicesMock(serviceName string) ([]string, error) {
+ DLog.Printf("GetEndpointDevicesMock serviceName: %s\n", serviceName)
+ return []string{"localhost"}, nil
}
+func ExecuteAppMock(target string, name string, args []string, notiChan chan string) (serviceID uint64, err error) {
+ ILog.Println("ExecuteApp")
+ ILog.Println(target)
+ ILog.Println(name)
+ ILog.Println(args)
+ return
+}
func execCommand(command string) {
- configuremgr.DLog.Println(command)
- cmd := exec.Command("sh", "-c", command)
- stdoutStderr, err := cmd.CombinedOutput()
- configuremgr.DLog.Printf("%s", stdoutStderr)
- if err != nil {
- configuremgr.ELog.Fatal(err)
- }
-}
\ No newline at end of file
+ configuremgr.DLog.Println(command)
+ cmd := exec.Command("sh", "-c", command)
+ stdoutStderr, err := cmd.CombinedOutput()
+ configuremgr.DLog.Printf("%s", stdoutStderr)
+ if err != nil {
+ configuremgr.ELog.Fatal(err)
+ }
+}