Add debug logs to Azure tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
4
.github/workflows/e2e-azure.yaml
vendored
4
.github/workflows/e2e-azure.yaml
vendored
@@ -5,7 +5,7 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '0 6 * * *'
|
- cron: '0 6 * * *'
|
||||||
push:
|
push:
|
||||||
branches: [ azure/e2e ]
|
branches: [ azure* ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2e:
|
e2e:
|
||||||
@@ -63,4 +63,4 @@ jobs:
|
|||||||
ls $HOME/.local/bin
|
ls $HOME/.local/bin
|
||||||
az login --service-principal -u ${ARM_CLIENT_ID} -p ${ARM_CLIENT_SECRET} -t ${ARM_TENANT_ID}
|
az login --service-principal -u ${ARM_CLIENT_ID} -p ${ARM_CLIENT_SECRET} -t ${ARM_TENANT_ID}
|
||||||
cd ./tests/azure
|
cd ./tests/azure
|
||||||
go test -timeout 60m .
|
go test -v -coverprofile cover.out -timeout 60m .
|
||||||
|
|||||||
@@ -808,20 +808,21 @@ func TestEventHubNotification(t *testing.T) {
|
|||||||
event := &events.Event{}
|
event := &events.Event{}
|
||||||
err := json.Unmarshal([]byte(eventJson), event)
|
err := json.Unmarshal([]byte(eventJson), event)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
t.Logf("the received event type does not match Flux format, error: %v", err)
|
||||||
return false
|
|
||||||
}
|
|
||||||
if event.InvolvedObject.Kind != "Kustomization" {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if strings.Contains(event.Message, "Health check passed") {
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if event.InvolvedObject.Kind == kustomizev1.KustomizationKind &&
|
||||||
|
strings.Contains(event.Message, "Health check passed") {
|
||||||
return true
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
t.Logf("event received from '%s/%s': %s",
|
||||||
|
event.InvolvedObject.Kind, event.InvolvedObject.Name, event.Message)
|
||||||
|
return false
|
||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
//}, 700*time.Second, 10*time.Second)
|
|
||||||
}, 60*time.Second, 1*time.Second)
|
}, 60*time.Second, 1*time.Second)
|
||||||
err = listenerHandler.Close(ctx)
|
err = listenerHandler.Close(ctx)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user