Skip to content

Commit 4a04173

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 5950716 commit 4a04173

File tree

4 files changed

+13
-19
lines changed

4 files changed

+13
-19
lines changed

package/Dockerfile.dapper-base

Lines changed: 7 additions & 6 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-rc3
@@ -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} && \
@@ -45,7 +46,7 @@ RUN dnf -y distrosync --nodocs --setopt=install_weak_deps=False && \
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 && \
4748
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 \
49+
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 \
4950
/usr/bin/kubefedctl && \
5051
ln -f /usr/bin/kubectl /usr/bin/hyperkube
5152

test/e2e/e2e.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@ var _ = ginkgo.SynchronizedAfterSuite(func() {
4444
// Run only Ginkgo on node 1
4545
})
4646

47-
func init() {
48-
framework.ParseFlags()
49-
}
50-
5147
func RunE2ETests(t *testing.T) {
48+
framework.ValidateFlags(framework.TestContext)
49+
5250
gomega.RegisterFailHandler(ginkgo.Fail)
5351

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

test/e2e/e2e_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"testing"
55

66
_ "github.com/submariner-io/shipyard/test/e2e/example"
7+
_ "github.com/submariner-io/submariner/test/e2e/framework"
78
)
89

910
func TestE2E(t *testing.T) {

test/e2e/framework/test_context.go

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

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

59-
func validateFlags(t *TestContextType) {
59+
func ValidateFlags(t *TestContextType) {
6060
if len(t.KubeConfig) == 0 {
6161
klog.Fatalf("kubeconfig parameter or KUBECONFIG environment variable is required")
6262
}
@@ -65,9 +65,3 @@ func validateFlags(t *TestContextType) {
6565
klog.Fatalf("several kubernetes contexts are necessary east, west, etc..")
6666
}
6767
}
68-
69-
func ParseFlags() {
70-
registerFlags(TestContext)
71-
flag.Parse()
72-
validateFlags(TestContext)
73-
}

0 commit comments

Comments
 (0)