WIP: Added gingko test site shells
Docker-push commented out test reqirement.
This commit is contained in:
parent
adeb978243
commit
41c6720e26
@ -11,8 +11,8 @@ RUN go mod download
|
||||
|
||||
# Copy the go source
|
||||
COPY main.go main.go
|
||||
COPY api/ api/
|
||||
COPY controllers/ controllers/
|
||||
COPY pkg/ pkg/
|
||||
|
||||
|
||||
# Build
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
|
||||
|
7
Makefile
7
Makefile
@ -1,6 +1,8 @@
|
||||
|
||||
# Image URL to use all building/pushing image targets
|
||||
IMG ?= controller:latest
|
||||
#IMG ?= controller:latest
|
||||
IMG ?= quay.io/jezogwza/airship:sip.v1
|
||||
|
||||
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
|
||||
CRD_OPTIONS ?= "crd:trivialVersions=true"
|
||||
|
||||
@ -55,7 +57,8 @@ generate: controller-gen
|
||||
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
|
||||
|
||||
# Build the docker image
|
||||
docker-build: test
|
||||
#docker-build: test
|
||||
docker-build:
|
||||
docker build . -t ${IMG}
|
||||
|
||||
# Push the docker image
|
||||
|
121
cover.out
121
cover.out
@ -1,23 +1,110 @@
|
||||
mode: set
|
||||
sipcluster/pkg/services/loadbalancer.go:25.76,32.2 1 0
|
||||
sipcluster/pkg/services/authhost.go:25.72,33.2 2 0
|
||||
sipcluster/pkg/services/errors.go:23.53,25.2 1 0
|
||||
sipcluster/pkg/services/infrastructureservice.go:43.83,52.62 2 0
|
||||
sipcluster/pkg/services/infrastructureservice.go:55.2,55.12 1 0
|
||||
sipcluster/pkg/services/infrastructureservice.go:52.62,54.3 1 0
|
||||
sipcluster/pkg/services/infrastructureservice.go:58.36,62.2 1 0
|
||||
sipcluster/pkg/services/infrastructureservice.go:65.114,66.48 1 0
|
||||
sipcluster/pkg/services/infrastructureservice.go:73.2,73.43 1 0
|
||||
sipcluster/pkg/services/infrastructureservice.go:66.48,68.3 1 0
|
||||
sipcluster/pkg/services/infrastructureservice.go:68.8,68.51 1 0
|
||||
sipcluster/pkg/services/infrastructureservice.go:68.51,70.3 1 0
|
||||
sipcluster/pkg/services/infrastructureservice.go:70.8,70.51 1 0
|
||||
sipcluster/pkg/services/infrastructureservice.go:70.51,72.3 1 0
|
||||
sipcluster/pkg/services/jumphost.go:25.72,32.2 1 0
|
||||
sipcluster/pkg/vbmh/errors.go:12.49,14.2 1 0
|
||||
sipcluster/pkg/vbmh/errors.go:21.52,23.2 1 0
|
||||
sipcluster/pkg/vbmh/errors.go:31.45,33.2 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:90.103,96.16 3 0
|
||||
sipcluster/pkg/vbmh/machines.go:101.2,102.16 2 0
|
||||
sipcluster/pkg/vbmh/machines.go:110.2,110.12 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:96.16,98.3 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:102.16,104.3 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:113.87,115.32 2 0
|
||||
sipcluster/pkg/vbmh/machines.go:118.2,118.33 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:115.32,117.3 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:122.84,133.16 4 0
|
||||
sipcluster/pkg/vbmh/machines.go:136.2,142.16 3 0
|
||||
sipcluster/pkg/vbmh/machines.go:145.2,145.20 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:133.16,135.3 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:142.16,144.3 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:148.125,157.39 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:168.2,168.12 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:157.39,159.17 2 0
|
||||
sipcluster/pkg/vbmh/machines.go:162.3,163.17 2 0
|
||||
sipcluster/pkg/vbmh/machines.go:159.17,161.4 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:163.17,165.4 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:171.138,174.41 2 0
|
||||
sipcluster/pkg/vbmh/machines.go:191.2,191.21 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:194.2,194.20 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:174.41,175.47 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:182.3,182.49 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:175.47,181.4 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:182.49,188.4 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:191.21,193.3 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:197.191,200.35 3 0
|
||||
sipcluster/pkg/vbmh/machines.go:242.2,242.20 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:248.2,248.12 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:200.35,201.49 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:220.3,220.15 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:239.3,239.18 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:201.49,204.43 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:204.43,210.44 2 0
|
||||
sipcluster/pkg/vbmh/machines.go:210.44,212.56 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:212.56,214.12 2 0
|
||||
sipcluster/pkg/vbmh/machines.go:220.15,233.23 4 0
|
||||
sipcluster/pkg/vbmh/machines.go:233.23,234.10 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:242.20,247.3 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:253.85,255.34 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:277.2,277.12 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:255.34,265.17 4 0
|
||||
sipcluster/pkg/vbmh/machines.go:271.3,272.17 2 0
|
||||
sipcluster/pkg/vbmh/machines.go:265.17,267.4 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:272.17,274.4 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:427.152,431.45 2 0
|
||||
sipcluster/pkg/vbmh/machines.go:469.2,469.12 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:431.45,433.61 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:433.61,439.44 6 0
|
||||
sipcluster/pkg/vbmh/machines.go:439.44,440.29 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:459.5,459.17 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:440.29,441.37 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:442.25,443.37 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:454.7,454.18 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:443.37,445.76 2 0
|
||||
sipcluster/pkg/vbmh/machines.go:448.8,448.60 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:445.76,447.9 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:448.60,451.14 3 0
|
||||
sipcluster/pkg/vbmh/machines.go:454.18,455.13 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:459.17,465.6 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:485.38,487.2 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:488.50,489.21 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:492.2,492.14 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:489.21,491.3 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:495.95,496.19 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:499.2,500.17 2 0
|
||||
sipcluster/pkg/vbmh/machines.go:503.2,503.36 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:496.19,498.3 1 0
|
||||
sipcluster/pkg/vbmh/machines.go:500.17,502.3 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:43.81,49.61 4 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:57.2,58.16 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:64.2,65.16 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:69.2,70.16 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:73.2,73.27 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:62.2,63.16 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:66.2,66.27 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:49.61,55.3 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:58.16,60.3 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:65.16,67.3 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:70.16,72.3 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:76.73,80.2 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:107.100,114.16 3 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:117.2,117.22 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:63.16,65.3 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:69.73,73.2 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:100.100,107.16 3 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:113.2,114.16 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:118.2,118.22 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:107.16,109.3 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:114.16,116.3 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:122.112,124.2 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:126.110,127.53 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:146.2,146.12 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:127.53,130.17 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:135.3,136.17 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:141.3,142.17 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:130.17,132.4 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:136.17,138.4 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:142.17,144.4 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:121.110,122.53 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:142.2,142.12 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:122.53,125.17 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:130.3,131.17 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:137.3,138.17 2 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:125.17,127.4 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:131.17,133.4 1 0
|
||||
sipcluster/pkg/controllers/sipcluster_controller.go:138.17,140.4 1 0
|
||||
|
4
go.mod
4
go.mod
@ -6,8 +6,8 @@ require (
|
||||
github.com/fluxcd/helm-controller/api v0.1.3
|
||||
github.com/go-logr/logr v0.2.1
|
||||
github.com/metal3-io/baremetal-operator v0.0.0-20201014161845-a6d4f1fc3228
|
||||
github.com/onsi/ginkgo v1.12.1
|
||||
github.com/onsi/gomega v1.10.1
|
||||
github.com/onsi/ginkgo v1.14.2
|
||||
github.com/onsi/gomega v1.10.3
|
||||
github.com/prometheus/common v0.10.0
|
||||
gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e // indirect
|
||||
k8s.io/api v0.19.0
|
||||
|
9
go.sum
9
go.sum
@ -313,6 +313,8 @@ github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
|
||||
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M=
|
||||
github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
@ -320,6 +322,8 @@ github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34=
|
||||
github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
|
||||
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA=
|
||||
github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
|
||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
@ -472,6 +476,8 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0 h1:wBouT66WTYFXdxfVdz9sVWARVd/2vfGcmI45D2gj45M=
|
||||
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
|
||||
@ -513,9 +519,12 @@ golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8=
|
||||
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -112,7 +112,7 @@ func (r *SIPClusterReconciler) gatherVM(sip airshipv1.SIPCluster) (error, *airsh
|
||||
// So that LB and Jump Host all leverage the same
|
||||
err = machines.Extrapolate(sip, r.Client)
|
||||
if err != nil {
|
||||
return err, machines
|
||||
return err, machines
|
||||
}
|
||||
|
||||
return nil, machines
|
||||
|
13
pkg/services/services_suite_test.go
Normal file
13
pkg/services/services_suite_test.go
Normal file
@ -0,0 +1,13 @@
|
||||
package services_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
func TestServices(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "Services Suite")
|
||||
}
|
@ -30,4 +30,4 @@ type ErrorHostIpNotFound struct {
|
||||
|
||||
func (e ErrorHostIpNotFound) Error() string {
|
||||
return fmt.Sprintf("Unable to identify the vBMH Host %v IP address on interface %v required by Infrastructure Service %v ", e.HostName, e.IPInterface, e.ServiceName)
|
||||
}
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ func (ml *MachineList) scheduleIt(nodeRole airshipv1.VmRoles, nodeCfg airshipv1.
|
||||
|
||||
// Extrapolate
|
||||
// The intention is to extract the IP information from the referenced networkData field for the BareMetalHost
|
||||
func (ml *MachineList) Extrapolate(sip airshipv1.SIPCluster, c client.Client) error {
|
||||
func (ml *MachineList) Extrapolate(sip airshipv1.SIPCluster, c client.Client) error {
|
||||
// Lets get the data for all selected BMH's.
|
||||
for _, machine := range ml.bmhs {
|
||||
bmh := machine.Bmh
|
||||
|
13
pkg/vbmh/vbmh_suite_test.go
Normal file
13
pkg/vbmh/vbmh_suite_test.go
Normal file
@ -0,0 +1,13 @@
|
||||
package vbmh_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
func TestVbmh(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "Vbmh Suite")
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user