Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golang E2E in Openshift API-CI #1384

Merged
merged 33 commits into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f7e24f8
*: reworking for openshift-ci
AlexNPavel May 15, 2019
c32dbe0
Dockerfile.e2e-go: bump to golang 1.12
AlexNPavel May 23, 2019
5b758c4
test/e2e/memcached_test.go: don't use parallel tests
AlexNPavel May 24, 2019
5880b15
hack/tests,ci: reorganize
AlexNPavel May 30, 2019
0ef1599
Merge branch 'master' into e2e-prow
AlexNPavel May 30, 2019
5962cf4
Makefile: add missing make commands
AlexNPavel May 31, 2019
65a8f92
Update internal/test/flags.go
AlexNPavel Jun 4, 2019
2070197
scaffold,pkg/{metrics,leader,k8sutil}: add force local mode
AlexNPavel Jun 5, 2019
6f56b96
Merge branch 'e2e-prow' of github.com:AlexNPavel/operator-sdk into e2…
AlexNPavel Jun 5, 2019
7eb299a
test/e2e/memcached_test.go: remove old local flags
AlexNPavel Jun 5, 2019
00ba830
cmd/.../{test,up}/local: set env var for commands
AlexNPavel Jun 5, 2019
66bf196
Merge branch 'master' into e2e-prow
AlexNPavel Jun 5, 2019
3d3bb7a
Merge branch 'master' into e2e-prow
AlexNPavel Jun 10, 2019
6b8d72b
ci/dockerfiles,test/e2e: fix vendor problems
AlexNPavel Jun 11, 2019
5615d9f
ci/dockerfiles: rename 'intermediate' image
AlexNPavel Jun 11, 2019
0ad1613
Merge branch 'master' into e2e-prow
AlexNPavel Jun 12, 2019
435cdfc
Makefile,ci/tests: fix build issues
AlexNPavel Jun 12, 2019
455ab76
Merge branch 'master' into e2e-prow
AlexNPavel Jun 26, 2019
25d9d05
Merge branch 'master' into e2e-prow
AlexNPavel Jul 1, 2019
e3cc22e
ci/tests/e2e-go.sh: use existing go test scaffolder
AlexNPavel Jul 1, 2019
71206b2
internal,pkg/test,test/e2e: remove old workarounds
AlexNPavel Jul 1, 2019
1232663
Merge branch 'master' into e2e-prow
AlexNPavel Jul 10, 2019
6a4226a
ci: update e2e-go test image scaffolding
AlexNPavel Jul 10, 2019
206eb96
Merge branch 'master' into e2e-prow
AlexNPavel Jul 10, 2019
a6a8bf2
ci/dockerfiles: enable GO111MODULE in builder image
AlexNPavel Jul 10, 2019
0cabce7
ci/tests/e2e-go: add correct args for go test
AlexNPavel Jul 10, 2019
1a307bc
cmd/.../test,up,pkg/k8sutil: make new func and consts for run mode
AlexNPavel Jul 15, 2019
8041d49
hack/tests/scaffolding: remove trap for rm go.mod
AlexNPavel Jul 15, 2019
06ea958
Merge branch 'master' into e2e-prow
AlexNPavel Jul 15, 2019
c3f69b6
ci/dockerfiles/builder: make sure GOPATH is set for builds
AlexNPavel Jul 16, 2019
7a0dd70
ci/dockerfiles: rename e2e-go to make e2e image names consistent
AlexNPavel Jul 16, 2019
7927677
pkg/k8sutil: remove local check in getOperatorName
AlexNPavel Jul 16, 2019
1bb44c2
ci/tests/e2e-go: remove old debugging cat statement
AlexNPavel Jul 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ install:
" \
$(BUILD_PATH)

ci-build: build/operator-sdk-$(VERSION)-x86_64-linux-gnu ci-install

ci-install:
mv build/operator-sdk-$(VERSION)-x86_64-linux-gnu build/operator-sdk

release_x86_64 := \
build/operator-sdk-$(VERSION)-x86_64-linux-gnu \
build/operator-sdk-$(VERSION)-x86_64-apple-darwin
Expand Down Expand Up @@ -117,6 +122,9 @@ test/e2e: test/e2e/go test/e2e/ansible test/e2e/ansible-molecule test/e2e/helm
test/e2e/go:
./hack/tests/e2e-go.sh $(ARGS)

test/e2e/go2:
./ci/tests/e2e-go.sh $(ARGS)

test/e2e/ansible: image/build/ansible
./hack/tests/e2e-ansible.sh

Expand Down
9 changes: 9 additions & 0 deletions ci/dockerfiles/Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM openshift/origin-release:golang-1.12

WORKDIR /go/src/github.com/operator-framework/operator-sdk
# Set gopath before build and include build destination in PATH
ENV GOPATH=/go PATH=/go/src/github.com/operator-framework/operator-sdk/build:$PATH

COPY . .

RUN make ci-build
23 changes: 23 additions & 0 deletions ci/dockerfiles/Dockerfile.e2e-go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM osdk-builder as builder

RUN ci/tests/e2e-go-scaffold.sh

ENV GO111MODULE=on
RUN touch /go/src/github.com/operator-framework/operator-sdk/go.mod
RUN cd /go/src/$(cat /project_path.tmp)/memcached-operator && go build -gcflags "all=-trimpath=${GOPATH}" -asmflags "all=-trimpath=${GOPATH}" -o /memcached-operator $(cat /project_path.tmp)/memcached-operator/cmd/manager

FROM registry.access.redhat.com/ubi7/ubi-minimal:latest

ENV OPERATOR=/usr/local/bin/memcached-operator \
USER_UID=1001 \
USER_NAME=memcached-operator

# install operator binary
COPY --from=builder /memcached-operator ${OPERATOR}
COPY test/test-framework/build/bin /usr/local/bin

RUN /usr/local/bin/user_setup

ENTRYPOINT ["/usr/local/bin/entrypoint"]

USER ${USER_UID}
4 changes: 4 additions & 0 deletions ci/tests/e2e-go-scaffold.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -ex

go test ./test/e2e/... -root=. -globalMan=testdata/empty.yaml -generate-only $1
8 changes: 8 additions & 0 deletions ci/tests/e2e-go.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -ex

make install
# this configures the image correctly for memcached-operator
component="memcached-operator"
eval IMAGE=$IMAGE_FORMAT
go test ./test/e2e/... -root=. -globalMan=testdata/empty.yaml -v -no-image-build -image $IMAGE $1
5 changes: 4 additions & 1 deletion cmd/operator-sdk/test/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/operator-framework/operator-sdk/internal/util/fileutil"
"github.com/operator-framework/operator-sdk/internal/util/projutil"
"github.com/operator-framework/operator-sdk/internal/util/yamlutil"
"github.com/operator-framework/operator-sdk/pkg/k8sutil"
"github.com/operator-framework/operator-sdk/pkg/test"

"github.com/ghodss/yaml"
Expand Down Expand Up @@ -207,7 +208,9 @@ func testLocalGoFunc(cmd *cobra.Command, args []string) error {
if tlConfig.namespace != "" || tlConfig.noSetup {
testArgs = append(testArgs, "-"+test.SingleNamespaceFlag, "-parallel=1")
}
env := append(os.Environ(), fmt.Sprintf("%v=%v", test.TestNamespaceEnv, tlConfig.namespace))
if tlConfig.upLocal {
env = append(env, fmt.Sprintf("%s=local", k8sutil.ForceRunModeEnv))
testArgs = append(testArgs, "-"+test.LocalOperatorFlag)
if tlConfig.localOperatorFlags != "" {
testArgs = append(testArgs, "-"+test.LocalOperatorArgs, tlConfig.localOperatorFlags)
Expand All @@ -216,7 +219,7 @@ func testLocalGoFunc(cmd *cobra.Command, args []string) error {
opts := projutil.GoTestOptions{
GoCmdOptions: projutil.GoCmdOptions{
PackagePath: args[0] + "/...",
Env: append(os.Environ(), fmt.Sprintf("%v=%v", test.TestNamespaceEnv, tlConfig.namespace)),
Env: env,
Dir: projutil.MustGetwd(),
GoMod: projutil.IsDepManagerGoMod(),
},
Expand Down
1 change: 1 addition & 0 deletions cmd/operator-sdk/up/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func upLocal() error {
os.Exit(0)
}()
dc.Env = os.Environ()
dc.Env = append(dc.Env, fmt.Sprintf("%s=local", k8sutil.ForceRunModeEnv))
// only set env var if user explicitly specified a kubeconfig path
if kubeConfig != "" {
dc.Env = append(dc.Env, fmt.Sprintf("%v=%v", k8sutil.KubeConfigEnvVar, kubeConfig))
Expand Down
20 changes: 20 additions & 0 deletions internal/test/flags.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2019 The Operator-SDK Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package test

// This file allows us to share a variable between the test framework and our
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no other way around this? Just curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could add the variable to pkg/test, but I didn't want to expose that as part of the public API, so I decided it would be better to keep that in a separate internal package. If we feel that it's fine having that variable exposed, we could put it in pkg/test instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an okay tradeoff, thanks for the explanation!

// internal tests without exposing variables

var OnlyGenerate *bool
19 changes: 18 additions & 1 deletion pkg/k8sutil/k8sutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
)

// ForceRunModeEnv indicates if the operator should be forced to run in either local
// or cluster mode (currently only used for local mode)
var ForceRunModeEnv = "OSDK_FORCE_RUN_MODE"

var log = logf.Log.WithName("k8sutil")

// GetWatchNamespace returns the namespace the operator should be watching for changes
Expand All @@ -38,12 +42,19 @@ func GetWatchNamespace() (string, error) {
return ns, nil
}

// errNoNS indicates that a namespace could not be found for the current
// ErrNoNamespace indicates that a namespace could not be found for the current
// environment
var ErrNoNamespace = fmt.Errorf("namespace not found for current environment")

// ErrRunLocal indicates that the operator is set to run in local mode (this error
// is returned by functions that only work on operators running in cluster mode)
var ErrRunLocal = fmt.Errorf("operator run mode forced to local")

// GetOperatorNamespace returns the namespace the operator should be running in.
func GetOperatorNamespace() (string, error) {
if os.Getenv(ForceRunModeEnv) == "local" {
return "", ErrRunLocal
}
nsBytes, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace")
if err != nil {
if os.IsNotExist(err) {
Expand All @@ -58,6 +69,9 @@ func GetOperatorNamespace() (string, error) {

// GetOperatorName return the operator name
func GetOperatorName() (string, error) {
if os.Getenv(ForceRunModeEnv) == "local" {
return "", ErrRunLocal
}
operatorName, found := os.LookupEnv(OperatorNameEnvVar)
if !found {
return "", fmt.Errorf("%s must be set", OperatorNameEnvVar)
Expand Down Expand Up @@ -91,6 +105,9 @@ func ResourceExists(dc discovery.DiscoveryInterface, apiGroupVersion, kind strin
// is currently running.
// It expects the environment variable POD_NAME to be set by the downwards API.
func GetPod(ctx context.Context, client crclient.Client, ns string) (*corev1.Pod, error) {
if os.Getenv(ForceRunModeEnv) == "local" {
return nil, ErrRunLocal
}
podName := os.Getenv(PodNameEnvVar)
if podName == "" {
return nil, fmt.Errorf("required env %s not set, please configure downward API", PodNameEnvVar)
Expand Down
2 changes: 1 addition & 1 deletion pkg/leader/leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func Become(ctx context.Context, lockName string) error {

ns, err := k8sutil.GetOperatorNamespace()
if err != nil {
if err == k8sutil.ErrNoNamespace {
if err == k8sutil.ErrNoNamespace || err == k8sutil.ErrRunLocal {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question: At this point is there ever a case where err == k8sutil.ErrNoNamespace and err != k8sutil.ErrRunLocal?

Looking at the errors returned by cluster specific functions such as initOperatorService() and GetOperatorNamespace(), GetOperatorName() it seems they will all return ErrRunLocal if running locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user is using our commands, ErrNoNamespace probably shouldn't be hit since we manually force the run mode. I do assume it's possible if a user manually runs it themselves with go run cmd/manager/main.go.

log.Info("Skipping leader election; not running in a cluster.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func ExposeMetricsPort(ctx context.Context, port int32) (*v1.Service, error) {
// would error out and we would never get to this stage.
s, err := initOperatorService(ctx, client, port, PrometheusPortName)
if err != nil {
if err == k8sutil.ErrNoNamespace {
if err == k8sutil.ErrNoNamespace || err == k8sutil.ErrRunLocal {
log.Info("Skipping metrics Service creation; not running in a cluster.")
return nil, nil
}
Expand Down
8 changes: 6 additions & 2 deletions pkg/test/main_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"testing"

"github.com/operator-framework/operator-sdk/internal/pkg/scaffold"
"github.com/operator-framework/operator-sdk/internal/test"
"github.com/operator-framework/operator-sdk/internal/util/projutil"
"github.com/operator-framework/operator-sdk/pkg/k8sutil"

Expand Down Expand Up @@ -60,8 +61,11 @@ func MainEntry(m *testing.M) {
if err != nil {
log.Fatalf("Failed to change directory to project root: %v", err)
}
if err := setup(kubeconfigPath, namespacedManPath, *localOperator); err != nil {
log.Fatalf("Failed to set up framework: %v", err)
// this is a workaround for internal tests
if test.OnlyGenerate == nil || *test.OnlyGenerate == false {
if err := setup(kubeconfigPath, namespacedManPath, *localOperator); err != nil {
log.Fatalf("Failed to set up framework: %v", err)
}
}
// setup local operator command, but don't start it yet
var localCmd *exec.Cmd
Expand Down
4 changes: 4 additions & 0 deletions test/e2e/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,22 @@ import (
"flag"
"testing"

test "github.com/operator-framework/operator-sdk/internal/test"
f "github.com/operator-framework/operator-sdk/pkg/test"
)

type testArgs struct {
e2eImageName *string
localRepo *string
noImageBuild *bool
}

var args = &testArgs{}

func TestMain(m *testing.M) {
args.e2eImageName = flag.String("image", "", "operator image name <repository>:<tag> used to push the image, defaults to none (builds image to local docker repo)")
args.localRepo = flag.String("local-repo", "", "Path to local SDK repository being tested. Only use when running e2e tests locally")
args.noImageBuild = flag.Bool("no-image-build", false, "do not build the image during the test (used for multu-stage build test)")
test.OnlyGenerate = flag.Bool("generate-only", false, "only generate the project (used for multi-stage build test)")
f.MainEntry(m)
}
43 changes: 31 additions & 12 deletions test/e2e/memcached_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"time"

"github.com/operator-framework/operator-sdk/internal/pkg/scaffold"
test "github.com/operator-framework/operator-sdk/internal/test"
"github.com/operator-framework/operator-sdk/internal/util/fileutil"
"github.com/operator-framework/operator-sdk/internal/util/projutil"
"github.com/operator-framework/operator-sdk/internal/util/yamlutil"
Expand Down Expand Up @@ -89,7 +90,9 @@ func TestMemcached(t *testing.T) {
if err != nil {
t.Fatal(err)
}
ctx.AddCleanupFn(func() error { return os.RemoveAll(absProjectPath) })
if !*test.OnlyGenerate {
ctx.AddCleanupFn(func() error { return os.RemoveAll(absProjectPath) })
}

if err := os.MkdirAll(absProjectPath, fileutil.DefaultDirFileMode); err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -243,6 +246,14 @@ func TestMemcached(t *testing.T) {
t.Fatalf("Command \"go build ./...\" failed: %v\nCommand Output:\n%v", err, string(cmdOut))
}

if *test.OnlyGenerate {
err := ioutil.WriteFile(filepath.Join("/", "project_path.tmp"), []byte(filepath.Base(absProjectPath)), os.FileMode(0644))
if err != nil {
t.Fatalf("Failed to write project_path.tmp: %v", err)
}
return
}

file, err := yamlutil.GenerateCombinedGlobalManifest(scaffold.CRDsDir)
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -406,7 +417,7 @@ func verifyLeader(t *testing.T, namespace string, f *framework.Framework, labels
return true, nil
})
if err != nil {
return nil, fmt.Errorf("error getting leader lock configmap: %v\n", err)
return nil, fmt.Errorf("error getting leader lock configmap: %v", err)
}
t.Logf("Found leader lock configmap %s\n", lockName)

Expand Down Expand Up @@ -542,7 +553,13 @@ func MemcachedLocal(t *testing.T) {
t.Fatalf("Local operator not ready after 100 seconds: %v\n", err)
}

if err = memcachedScaleTest(t, framework.Global, ctx); err != nil {
if err := memcachedScaleTest(t, framework.Global, ctx); err != nil {
file, err2 := ioutil.ReadFile("stderr.txt")
if err2 != nil {
t.Logf("could not read log file: %v", err2)
} else {
t.Logf("up local log: %s", string(file))
}
t.Fatal(err)
}
}
Expand Down Expand Up @@ -572,18 +589,20 @@ func MemcachedCluster(t *testing.T) {
if err != nil {
t.Fatalf("Failed to write deploy/operator.yaml: %v", err)
}
t.Log("Building operator docker image")
cmdOut, err := exec.Command("operator-sdk", "build", *args.e2eImageName).CombinedOutput()
if err != nil {
t.Fatalf("Error: %v\nCommand Output: %s\n", err, string(cmdOut))
}

if !local {
t.Log("Pushing docker image to repo")
cmdOut, err = exec.Command("docker", "push", *args.e2eImageName).CombinedOutput()
if !*args.noImageBuild {
t.Log("Building operator docker image")
cmdOut, err := exec.Command("operator-sdk", "build", *args.e2eImageName).CombinedOutput()
if err != nil {
t.Fatalf("Error: %v\nCommand Output: %s\n", err, string(cmdOut))
}

if !local {
t.Log("Pushing docker image to repo")
cmdOut, err = exec.Command("docker", "push", *args.e2eImageName).CombinedOutput()
if err != nil {
t.Fatalf("Error: %v\nCommand Output: %s\n", err, string(cmdOut))
}
}
}

file, err := yamlutil.GenerateCombinedNamespacedManifest(scaffold.DeployDir)
Expand Down
18 changes: 17 additions & 1 deletion test/e2e/tls_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ import (
"reflect"
"testing"

test "github.com/operator-framework/operator-sdk/internal/test"
framework "github.com/operator-framework/operator-sdk/pkg/test"
tlsutil "github.com/operator-framework/operator-sdk/pkg/tls"

"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
apiErrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -82,6 +83,9 @@ func init() {
// and CA TLS assets exist in the k8s cluster for a given cr,
// the GenerateCert() simply returns those to the caller.
func TestBothAppAndCATLSAssetsExist(t *testing.T) {
if *test.OnlyGenerate {
return
}
ctx := framework.NewTestCtx(t)
defer ctx.Cleanup()
namespace, err := ctx.GetNamespace()
Expand Down Expand Up @@ -127,6 +131,9 @@ func TestBothAppAndCATLSAssetsExist(t *testing.T) {
// it won't verify the existing application TLS cert. Therefore, CertGenerator can't proceed
// and returns an error to the caller.
func TestOnlyAppSecretExist(t *testing.T) {
if *test.OnlyGenerate {
return
}
ctx := framework.NewTestCtx(t)
defer ctx.Cleanup()
namespace, err := ctx.GetNamespace()
Expand All @@ -153,6 +160,9 @@ func TestOnlyAppSecretExist(t *testing.T) {
// TestOnlyCAExist tests the case where only the CA exists in the cluster;
// GenerateCert can retrieve the CA and uses it to create a new application secret.
func TestOnlyCAExist(t *testing.T) {
if *test.OnlyGenerate {
return
}
ctx := framework.NewTestCtx(t)
defer ctx.Cleanup()
namespace, err := ctx.GetNamespace()
Expand Down Expand Up @@ -182,6 +192,9 @@ func TestOnlyCAExist(t *testing.T) {
// TestNoneOfCaAndAppSecretExist ensures that when none of the CA and Application TLS assets
// exist, GenerateCert() creates both and put them into the k8s cluster.
func TestNoneOfCaAndAppSecretExist(t *testing.T) {
if *test.OnlyGenerate {
return
}
ctx := framework.NewTestCtx(t)
defer ctx.Cleanup()
namespace, err := ctx.GetNamespace()
Expand All @@ -204,6 +217,9 @@ func TestNoneOfCaAndAppSecretExist(t *testing.T) {
// TestCustomCA ensures that if a user provides a custom Key and Cert and the CA and Application TLS assets
// do not exist, the GenerateCert method can use the custom CA to generate the TLS assest.
func TestCustomCA(t *testing.T) {
if *test.OnlyGenerate {
return
}
ctx := framework.NewTestCtx(t)
defer ctx.Cleanup()
namespace, err := ctx.GetNamespace()
Expand Down
Loading