Skip to content

Commit

Permalink
Merge pull request #69 from toughnoah/qa
Browse files Browse the repository at this point in the history
Qa
  • Loading branch information
toughnoah authored Aug 4, 2021
2 parents 5add766 + fd84ed6 commit c473311
Show file tree
Hide file tree
Showing 20 changed files with 143 additions and 348 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
go-version: 1.15

- name: Test
run: go test $(go list ./... | grep -v elastalert/controllers/test/e2e) -race -coverprofile=coverage.txt -covermode=atomic -gcflags=-l
run: go test $(go list ./... | grep -v github.com/toughnoah/elastalert-operator/controllers/test/e2e) -race -coverprofile=coverage.txt -covermode=atomic -gcflags=-l
- name: "upload test coverage report"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ resources:
domain: noah.domain
group: es
kind: Elastalert
path: elastalert/api/v1alpha1
path: github.com/toughnoah/elastalert-operator/api/v1alpha1
version: v1alpha1
version: "3"
6 changes: 3 additions & 3 deletions controllers/deployment_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package controllers

import (
"context"
"elastalert/api/v1alpha1"
"elastalert/controllers/observer"
"elastalert/controllers/podspec"
"errors"
"github.com/bouk/monkey"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/toughnoah/elastalert-operator/api/v1alpha1"
"github.com/toughnoah/elastalert-operator/controllers/observer"
"github.com/toughnoah/elastalert-operator/controllers/podspec"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down
6 changes: 3 additions & 3 deletions controllers/deployment_controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package controllers

import (
"context"
esv1alpha1 "elastalert/api/v1alpha1"
ob "elastalert/controllers/observer"
"elastalert/controllers/podspec"
esv1alpha1 "github.com/toughnoah/elastalert-operator/api/v1alpha1"
ob "github.com/toughnoah/elastalert-operator/controllers/observer"
"github.com/toughnoah/elastalert-operator/controllers/podspec"
appsv1 "k8s.io/api/apps/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
8 changes: 4 additions & 4 deletions controllers/elastalert_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package controllers

import (
"context"
esv1alpha1 "elastalert/api/v1alpha1"
"elastalert/controllers/event"
ob "elastalert/controllers/observer"
"elastalert/controllers/podspec"
esv1alpha1 "github.com/toughnoah/elastalert-operator/api/v1alpha1"
"github.com/toughnoah/elastalert-operator/controllers/event"
ob "github.com/toughnoah/elastalert-operator/controllers/observer"
"github.com/toughnoah/elastalert-operator/controllers/podspec"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down
6 changes: 3 additions & 3 deletions controllers/elastalert_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package controllers

import (
"context"
"elastalert/api/v1alpha1"
ob "elastalert/controllers/observer"
"elastalert/controllers/podspec"
"errors"
"fmt"
"github.com/bouk/monkey"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/toughnoah/elastalert-operator/api/v1alpha1"
ob "github.com/toughnoah/elastalert-operator/controllers/observer"
"github.com/toughnoah/elastalert-operator/controllers/podspec"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down
6 changes: 3 additions & 3 deletions controllers/observer/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package observer

import (
"context"
esv1alpha1 "elastalert/api/v1alpha1"
"elastalert/controllers/event"
"elastalert/controllers/podspec"
"fmt"
esv1alpha1 "github.com/toughnoah/elastalert-operator/api/v1alpha1"
"github.com/toughnoah/elastalert-operator/controllers/event"
"github.com/toughnoah/elastalert-operator/controllers/podspec"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
Expand Down
2 changes: 1 addition & 1 deletion controllers/observer/observer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package observer

import (
"context"
"elastalert/api/v1alpha1"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/toughnoah/elastalert-operator/api/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down
2 changes: 1 addition & 1 deletion controllers/podspec/configmap.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package podspec

import (
esv1alpha1 "elastalert/api/v1alpha1"
"errors"
"fmt"
esv1alpha1 "github.com/toughnoah/elastalert-operator/api/v1alpha1"
"gopkg.in/yaml.v2"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/podspec/configmap_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package podspec

import (
esv1alpha1 "elastalert/api/v1alpha1"
"github.com/stretchr/testify/require"
esv1alpha1 "github.com/toughnoah/elastalert-operator/api/v1alpha1"
"gopkg.in/yaml.v2"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/podspec/deployment.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package podspec

import (
"elastalert/api/v1alpha1"
"github.com/toughnoah/elastalert-operator/api/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/podspec/deployment_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package podspec

import (
"elastalert/api/v1alpha1"
"github.com/bouk/monkey"
"github.com/stretchr/testify/require"
"github.com/toughnoah/elastalert-operator/api/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down
2 changes: 1 addition & 1 deletion controllers/podspec/podtemplate.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package podspec

import (
"elastalert/api/v1alpha1"
"github.com/toughnoah/elastalert-operator/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
"time"
)
Expand Down
2 changes: 1 addition & 1 deletion controllers/podspec/secert_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package podspec

import (
"elastalert/api/v1alpha1"
"github.com/stretchr/testify/require"
"github.com/toughnoah/elastalert-operator/api/v1alpha1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/scheme"
Expand Down
2 changes: 1 addition & 1 deletion controllers/podspec/secret.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package podspec

import (
esv1alpha1 "elastalert/api/v1alpha1"
esv1alpha1 "github.com/toughnoah/elastalert-operator/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
2 changes: 1 addition & 1 deletion controllers/test/e2e/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package e2e
import (
"bytes"
"context"
"elastalert/api/v1alpha1"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/toughnoah/elastalert-operator/api/v1alpha1"
"gopkg.in/yaml.v2"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/test/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

esv1alpha1 "elastalert/api/v1alpha1"
esv1alpha1 "github.com/toughnoah/elastalert-operator/api/v1alpha1"
//+kubebuilder:scaffold:imports
)

Expand Down
43 changes: 10 additions & 33 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,40 +1,17 @@
module elastalert
module github.com/toughnoah/elastalert-operator

go 1.15
go 1.16

replace github.com/bouk/monkey v1.0.2 => bou.ke/monkey v1.0.0

require (
github.com/bouk/monkey v1.0.2
github.com/go-logr/zapr v0.4.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/googleapis/gnostic v0.5.3 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
github.com/prometheus/client_golang v1.9.0 // indirect
github.com/prometheus/procfs v0.3.0 // indirect
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.14.0
github.com/stretchr/testify v1.7.0
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.16.0 // indirect
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect
golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect
golang.org/x/oauth2 v0.0.0-20210113205817-d3ed898aa8a3 // indirect
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf // indirect
golang.org/x/text v0.3.5 // indirect
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/api v0.20.2
k8s.io/apiextensions-apiserver v0.20.2 // indirect
k8s.io/apimachinery v0.20.2
k8s.io/client-go v0.20.2
k8s.io/klog/v2 v2.8.0 // indirect
k8s.io/kube-openapi v0.0.0-20210113233702-8566a335510f // indirect
sigs.k8s.io/controller-runtime v0.8.3
k8s.io/api v0.21.3
k8s.io/apimachinery v0.21.3
k8s.io/client-go v0.21.3
sigs.k8s.io/controller-runtime v0.9.5
)

replace github.com/bouk/monkey v1.0.2 => bou.ke/monkey v1.0.0
Loading

0 comments on commit c473311

Please sign in to comment.