Skip to content

Commit 6af5012

Browse files
committed
Upgrade to Fedora 31
This requires upgrading to golangci-lint 1.18 to fix golangci/golangci-lint#658 with Go 1.13. Signed-off-by: Stephen Kitt <[email protected]>
1 parent 72b8eea commit 6af5012

File tree

4 files changed

+13
-23
lines changed

4 files changed

+13
-23
lines changed

package/Dockerfile.dapper-base

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM fedora:30
1+
FROM fedora:31
22

33
ENV DAPPER_HOST_ARCH=amd64
44
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} \
5-
LINT_VERSION=v1.16.0 \
5+
LINT_VERSION=v1.18.0 \
66
HELM_VERSION=v2.14.1 \
77
KIND_VERSION=v0.6.1 \
88
KUBEFED_VERSION=0.1.0-rc2
@@ -32,9 +32,10 @@ ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARC
3232
# jq | JSON processing (GitHub API)
3333
# diffutils | required for goimports
3434
RUN dnf -y distrosync --nodocs --setopt=install_weak_deps=False && \
35-
dnf -y install --nodocs --setopt=install_weak_deps=False gcc git-core curl moby-engine make golang kubernetes-client findutils upx jq && \
36-
dnf -y remove acl dnf-yum langpacks-en libevent libsemanage libsss_idmap libxcrypt-compat mkpasswd openssl python3-pip python3-setuptools \
37-
sssd-client unbound-libs whois-nls && \
35+
dnf -y install --nodocs --setopt=install_weak_deps=False \
36+
gcc git-core curl moby-engine make golang kubernetes-client \
37+
findutils upx jq golang-x-tools-goimports && \
38+
dnf -y remove libsemanage && \
3839
rpm -e --nodeps selinux-policy-targeted && \
3940
dnf -y clean all && \
4041
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin ${LINT_VERSION} && \
@@ -44,7 +45,6 @@ RUN dnf -y distrosync --nodocs --setopt=install_weak_deps=False && \
4445
mv kubefedctl /usr/bin/ && chmod a+x /usr/bin/kubefedctl && \
4546
curl -Lo /usr/bin/kind "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-${ARCH}" && chmod a+x /usr/bin/kind && \
4647
GOFLAGS="" go get -v github.com/onsi/ginkgo/ginkgo && \
47-
GOFLAGS="" go get -v golang.org/x/tools/cmd/goimports && \
48-
upx /go/bin/ginkgo /go/bin/goimports /go/bin/golangci-lint /usr/bin/containerd /usr/bin/docker /usr/bin/dockerd /usr/bin/helm /usr/bin/kubectl \
48+
upx /go/bin/ginkgo /go/bin/golangci-lint /usr/bin/containerd /usr/bin/docker /usr/bin/dockerd /usr/bin/goimports /usr/bin/helm /usr/bin/kubectl \
4949
/usr/bin/kubefedctl && \
5050
ln -f /usr/bin/kubectl /usr/bin/hyperkube

test/e2e/e2e.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ var _ = ginkgo.SynchronizedAfterSuite(func() {
4545
})
4646

4747
func RunE2ETests(t *testing.T) {
48+
framework.ValidateFlags(framework.TestContext)
49+
4850
gomega.RegisterFailHandler(ginkgo.Fail)
4951

5052
// If the ginkgo default for slow test was not modified, bump it to 45 seconds

test/e2e/e2e_test.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,13 @@ package e2e
33
import (
44
"testing"
55

6-
"github.com/submariner-io/submariner/test/e2e/framework"
7-
86
_ "github.com/submariner-io/submariner/test/e2e/cluster"
97
_ "github.com/submariner-io/submariner/test/e2e/dataplane"
108
_ "github.com/submariner-io/submariner/test/e2e/example"
9+
_ "github.com/submariner-io/submariner/test/e2e/framework"
1110
_ "github.com/submariner-io/submariner/test/e2e/redundancy"
1211
)
1312

14-
func init() {
15-
framework.ParseFlags()
16-
}
17-
1813
func TestE2E(t *testing.T) {
19-
2014
RunE2ETests(t)
2115
}

test/e2e/framework/test_context.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ var TestContext *TestContextType = &TestContextType{
4646
ClientBurst: 50,
4747
}
4848

49-
func registerFlags(t *TestContextType) {
50-
flag.StringVar(&t.KubeConfig, "kubeconfig", os.Getenv("KUBECONFIG"),
49+
func init() {
50+
flag.StringVar(&TestContext.KubeConfig, "kubeconfig", os.Getenv("KUBECONFIG"),
5151
"Path to kubeconfig containing embedded authinfo.")
5252
flag.Var(&TestContext.KubeContexts, "dp-context", "kubeconfig context for dataplane clusters (use several times).")
5353
flag.StringVar(&TestContext.ReportPrefix, "report-prefix", "", "Optional prefix for JUnit XML reports. Default is empty, which doesn't prepend anything to the default name.")
@@ -58,7 +58,7 @@ func registerFlags(t *TestContextType) {
5858
flag.UintVar(&TestContext.OperationTimeout, "operation-timeout", 60, "The general operation timeout in seconds.")
5959
}
6060

61-
func validateFlags(t *TestContextType) {
61+
func ValidateFlags(t *TestContextType) {
6262
if len(t.KubeConfig) == 0 {
6363
klog.Fatalf("kubeconfig parameter or KUBECONFIG environment variable is required")
6464
}
@@ -67,9 +67,3 @@ func validateFlags(t *TestContextType) {
6767
klog.Fatalf("several kubernetes contexts are necessary east, west, etc..")
6868
}
6969
}
70-
71-
func ParseFlags() {
72-
registerFlags(TestContext)
73-
flag.Parse()
74-
validateFlags(TestContext)
75-
}

0 commit comments

Comments
 (0)