mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-26 09:57:23 +03:00
M #-: Fix for Go Travis tests (#3742)
This commit is contained in:
parent
a2f86699b8
commit
c185bebb57
@ -14,9 +14,6 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
# temporarily disabling Go Tests until hook issue is resolved
|
||||
exit 0
|
||||
|
||||
# walk to goca path
|
||||
cd src/oca/go/src/goca
|
||||
|
||||
|
@ -78,7 +78,7 @@ func TestHook(t *testing.T) {
|
||||
}
|
||||
|
||||
// Check execution records
|
||||
currentExecs := len(hook.HookLog)
|
||||
currentExecs := len(hook.Log.ExecutionRecords)
|
||||
|
||||
//triger the hook
|
||||
testCtrl.Zone(0).Info()
|
||||
@ -87,24 +87,24 @@ func TestHook(t *testing.T) {
|
||||
|
||||
hook, err = hookC.Info()
|
||||
|
||||
if (len(hook.HookLog) <= currentExecs) {
|
||||
if (len(hook.Log.ExecutionRecords) <= currentExecs) {
|
||||
t.Errorf("Hook have not been triggered")
|
||||
}
|
||||
|
||||
// Check retry functionality
|
||||
currentExecs = len(hook.HookLog)
|
||||
currentExecs = len(hook.Log.ExecutionRecords)
|
||||
|
||||
hookC.Retry(hook.HookLog[0].ExecId)
|
||||
hookC.Retry(hook.Log.ExecutionRecords[0].ExecId)
|
||||
|
||||
time.Sleep(2 * time.Second)
|
||||
|
||||
hook, err = hookC.Info()
|
||||
|
||||
if (len(hook.HookLog) <= currentExecs) {
|
||||
if (len(hook.Log.ExecutionRecords) <= currentExecs) {
|
||||
t.Errorf("Hook execution have not been retried")
|
||||
}
|
||||
|
||||
if (hook.HookLog[len(hook.HookLog) -1].Retry != "yes") {
|
||||
if (hook.Log.ExecutionRecords[len(hook.Log.ExecutionRecords) -1].Retry != "yes") {
|
||||
t.Errorf("Hook execution have not been retried")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user