Skip to content

Commit 6254df9

Browse files
yashmehrotramoshloop
authored andcommitted
chore: remove gcp funcs
1 parent 6932011 commit 6254df9

File tree

4 files changed

+0
-79
lines changed

4 files changed

+0
-79
lines changed

cel.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"regexp"
66

77
"github.com/flanksource/gomplate/v3/funcs"
8-
"github.com/flanksource/gomplate/v3/gcp"
98
"github.com/flanksource/gomplate/v3/kubernetes"
109
"github.com/flanksource/gomplate/v3/strings"
1110
"github.com/google/cel-go/cel"
@@ -22,7 +21,6 @@ func GetCelEnv(environment map[string]any) []cel.EnvOption {
2221
// Generated functions
2322
var opts = funcs.CelEnvOption
2423
opts = append(opts, kubernetes.Library()...)
25-
opts = append(opts, gcp.Library()...)
2624
opts = append(opts, ext.Strings(), ext.Encoders(), ext.Lists(), ext.Math(), ext.Sets())
2725
opts = append(opts, cel.StdLib())
2826
opts = append(opts, cel.OptionalTypes())

gcp/cel_export.go

Lines changed: 0 additions & 9 deletions
This file was deleted.

gcp/incidents.go

Lines changed: 0 additions & 45 deletions
This file was deleted.

tests/cel_test.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -667,26 +667,3 @@ func TestCelUUID(t *testing.T) {
667667
{nil, "string(uuid.Parse('2a42e576-c308-4db9-8525-0513af307586'))", "2a42e576-c308-4db9-8525-0513af307586"},
668668
})
669669
}
670-
671-
func TestGCPIncidentsToCheckResult(t *testing.T) {
672-
env := map[string]any{
673-
"r": map[string]any{
674-
"incident_id": "0.nrwo9fe1a4wg",
675-
"summary": "Sent packets for flanksource-sandbox gke-hub-cluster-private-pool-containe-00531631-rf93 with metric labels {instance_name=gke-hub-cluster-private-pool-containe-00531631-rf93, loadbalanced=false} returned to normal with a value of Incident cancelled because the alert policy condition was deleted or modified while incident was active.",
676-
"resource_name": "flanksource-sandbox gke-hub-cluster-private-pool-containe-00531631-rf93",
677-
},
678-
}
679-
680-
output := map[string]any{
681-
"description": "Sent packets for flanksource-sandbox gke-hub-cluster-private-pool-containe-00531631-rf93 with metric labels {instance_name=gke-hub-cluster-private-pool-containe-00531631-rf93, loadbalanced=false} returned to normal with a value of Incident cancelled because the alert policy condition was deleted or modified while incident was active.",
682-
"details": map[string]any{
683-
"incident_id": "0.nrwo9fe1a4wg",
684-
"resource_name": "flanksource-sandbox gke-hub-cluster-private-pool-containe-00531631-rf93",
685-
"summary": "Sent packets for flanksource-sandbox gke-hub-cluster-private-pool-containe-00531631-rf93 with metric labels {instance_name=gke-hub-cluster-private-pool-containe-00531631-rf93, loadbalanced=false} returned to normal with a value of Incident cancelled because the alert policy condition was deleted or modified while incident was active.",
686-
},
687-
"message": "Sent packets for flanksource-sandbox gke-hub-cluster-private-pool-containe-00531631-rf93 with metric labels {instance_name=gke-hub-cluster-private-pool-containe-00531631-rf93, loadbalanced=false} returned to normal with a value of Incident cancelled because the alert policy condition was deleted or modified while incident was active.",
688-
"name": "[0.nrwo9fe1a4wg] Sent packets for flanksource-sandbox gke-hub-cluster-private-pool-containe-00531631-rf93 with metric labels {instance_name=gke-hub-cluster-private-pool-containe-00531631-rf93, loadbalanced=false} returned to normal with a value of Incident cancelled because the alert policy condition was deleted or modified while incident was active.",
689-
"pass": false,
690-
}
691-
executeTemplate(t, 0, `gcp.incidents.toCheckResult(r)`, output, env, false)
692-
}

0 commit comments

Comments
 (0)