Skip to content

Commit

Permalink
remove e2e testing for cloudevents.
Browse files Browse the repository at this point in the history
Signed-off-by: morvencao <lcao@redhat.com>
  • Loading branch information
morvencao committed Apr 16, 2024
1 parent da0d4f9 commit d8d4f52
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 754 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/go-presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,37 +119,6 @@ jobs:
env:
KUBECONFIG: /home/runner/.kube/config

e2e-cloudevents:
name: e2e-cloudevents
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: install Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: install imagebuilder
run: go install github.com/openshift/imagebuilder/cmd/imagebuilder@v1.2.3
- name: addon-examples-image
run: imagebuilder --allow-pull -t quay.io/open-cluster-management/addon-examples:latest -t quay.io/ocm/addon-examples:latest -f ./build/Dockerfile.example .
- name: setup kind
uses: engineerd/setup-kind@v0.5.0
with:
version: v0.11.1
name: cluster1
- name: Load image on the nodes of the cluster
run: |
kind load docker-image --name=cluster1 quay.io/open-cluster-management/addon-examples:latest
kind load docker-image --name=cluster1 quay.io/ocm/addon-examples:latest
- name: Run e2e test with cloudevents
run: |
make test-e2e-cloudevents
env:
KUBECONFIG: /home/runner/.kube/config

e2e-hosted:
name: e2e-hosted
runs-on: ubuntu-latest
Expand Down
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,6 @@ build-e2e:
test-e2e: build-e2e deploy-ocm deploy-helloworld deploy-helloworld-helm
./e2e.test -test.v -ginkgo.v

build-e2e-cloudevents:
go test -c ./test/e2ecloudevents

test-e2e-cloudevents: build-e2e-cloudevents deploy-ocm-cloudevents deploy-helloworld-cloudevents
./e2ecloudevents.test -test.v -ginkgo.v

build-hosted-e2e:
go test -c ./test/e2ehosted

Expand Down
5 changes: 0 additions & 5 deletions pkg/addonmanager/addontesting/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (
addonapiv1alpha1 "open-cluster-management.io/api/addon/v1alpha1"
clusterv1 "open-cluster-management.io/api/cluster/v1"
workapiv1 "open-cluster-management.io/api/work/v1"
"open-cluster-management.io/sdk-go/pkg/cloudevents/work/common"
"open-cluster-management.io/sdk-go/pkg/cloudevents/work/payload"

"open-cluster-management.io/addon-framework/pkg/basecontroller/events"
)
Expand Down Expand Up @@ -189,9 +187,6 @@ func NewManifestWork(name, namespace string, objects ...*unstructured.Unstructur
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
Annotations: map[string]string{
common.CloudEventsDataTypeAnnotationKey: payload.ManifestBundleEventDataType.String(),
},
},
Spec: workapiv1.ManifestWorkSpec{
Workload: workapiv1.ManifestsTemplate{
Expand Down
13 changes: 0 additions & 13 deletions pkg/addonmanager/controllers/agentdeploy/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
clusterv1 "open-cluster-management.io/api/cluster/v1"
workapiv1 "open-cluster-management.io/api/work/v1"
workbuilder "open-cluster-management.io/sdk-go/pkg/apis/work/v1/builder"
"open-cluster-management.io/sdk-go/pkg/cloudevents/work/common"
"open-cluster-management.io/sdk-go/pkg/cloudevents/work/payload"

"open-cluster-management.io/addon-framework/pkg/addonmanager/constants"
"open-cluster-management.io/addon-framework/pkg/agent"
Expand Down Expand Up @@ -92,9 +90,6 @@ func newManifestWork(addonNamespace, addonName, clusterName string, manifests []
Labels: map[string]string{
addonapiv1alpha1.AddonLabelKey: addonName,
},
Annotations: map[string]string{
common.CloudEventsDataTypeAnnotationKey: payload.ManifestBundleEventDataType.String(),
},
},
Spec: workapiv1.ManifestWorkSpec{
Workload: workapiv1.ManifestsTemplate{
Expand Down Expand Up @@ -320,14 +315,6 @@ func (b *addonWorksBuilder) BuildDeployWorks(installMode, addonWorkNamespace str
return nil, nil, err
}

if len(annotations) == 0 {
annotations = map[string]string{
common.CloudEventsDataTypeAnnotationKey: payload.ManifestBundleEventDataType.String(),
}
} else {
annotations[common.CloudEventsDataTypeAnnotationKey] = payload.ManifestBundleEventDataType.String()
}

return b.workBuilder.Build(deployObjects,
newAddonWorkObjectMeta(b.processor.manifestWorkNamePrefix(addon.Namespace, addon.Name), addon.Name, addon.Namespace, addonWorkNamespace, owner),
workbuilder.ExistingManifestWorksOption(existingWorks),
Expand Down
8 changes: 0 additions & 8 deletions pkg/addonmanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,6 @@ type AddonManager interface {

// Start starts all registered addon agent.
Start(ctx context.Context) error

// StartWithInformers starts all registered addon agent with the given informers.
// StartWithInformers(ctx context.Context,
// kubeInformers kubeinformers.SharedInformerFactory,
// workInformers workv1informers.SharedInformerFactory,
// addonInformers addoninformers.SharedInformerFactory,
// clusterInformers clusterv1informers.SharedInformerFactory,
// dynamicInformers dynamicinformer.DynamicSharedInformerFactory) error
}

type addonManager struct {
Expand Down
155 changes: 0 additions & 155 deletions test/e2ecloudevents/e2e_suite_test.go

This file was deleted.

Loading

0 comments on commit d8d4f52

Please sign in to comment.