Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
mfaizanse committed Jan 12, 2024
1 parent 63c0001 commit 7e2fba3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 34 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/e2e-k8s.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: e2e-on-k8s

env:
KYMA_STABILITY: "unstable"
KYMA: "./hack/kyma"
MANAGER_IMAGE: europe-docker.pkg.dev/kyma-project/dev/eventing-manager:PR-${{ github.event.number }}

on:
pull_request_target:
branches:
- main
- "release-*"
paths-ignore:
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"

jobs:
backend-switching:
runs-on: ubuntu-latest
needs: wait-until-build-succeeds

steps:
- uses: actions/checkout@v4

- name: Cache Binaries
id: cache-binaries
uses: actions/cache@v3
with:
path: bin
key: ${{ runner.os }}-bin

- name: Install Kyma CLI
run: |
echo ${TUNAS_TEST_1} > hello.txt
cat hello.txt
31 changes: 0 additions & 31 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,9 @@ on:
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"
pull_request_target:
branches:
- main
- "release-*"
paths-ignore:
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"

jobs:
wait-until-build-succeeds:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Wait for the 'pull-eventing-manager-build' job to succeed
Expand All @@ -43,7 +34,6 @@ jobs:

nats:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
needs: wait-until-build-succeeds

steps:
Expand Down Expand Up @@ -109,7 +99,6 @@ jobs:
PeerAuthentication:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
needs: wait-until-build-succeeds

steps:
Expand Down Expand Up @@ -147,23 +136,3 @@ jobs:
if: failure()
run: |
kubectl get peerauthentications.security.istio.io -A -o yaml
backend-switching:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target'
needs: wait-until-build-succeeds

steps:
- uses: actions/checkout@v4

- name: Cache Binaries
id: cache-binaries
uses: actions/cache@v3
with:
path: bin
key: ${{ runner.os }}-bin

- name: Install Kyma CLI
run: |
echo ${TUNAS_TEST_1} > hello.txt
cat hello.txt
4 changes: 2 additions & 2 deletions hack/e2e/setup/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ func Test_WebhookServerCertSecret(t *testing.T) {
func Test_WebhookServerCertJob(t *testing.T) {
t.Parallel()
ctx := context.TODO()
err := Retry(2, testenvironment.Interval, func() error {
err := Retry(testenvironment.Attempts, testenvironment.Interval, func() error {
job, getErr := testEnvironment.K8sClientset.BatchV1().Jobs(NamespaceName).Get(ctx, WebhookServerCertJobName, metav1.GetOptions{})
if getErr != nil {
return getErr
}

// Check if the PriorityClassName was set correctly.
if job.Spec.Template.Spec.PriorityClassName == eventing.PriorityClassName {
if job.Spec.Template.Spec.PriorityClassName != eventing.PriorityClassName {
return fmt.Errorf("Job '%s' was expected to have PriorityClassName '%s' but has '%s'",
job.GetName(),
eventing.PriorityClassName,
Expand Down
2 changes: 1 addition & 1 deletion pkg/k8s/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func Test_PatchApply(t *testing.T) {
gotSTS, err := kubeClient.GetDeployment(context.Background(),
tc.givenUpdateDeployment.GetName(), tc.givenUpdateDeployment.GetNamespace())
require.NoError(t, err)
require.Empty(t, tc.givenUpdateDeployment.GetName())
require.Equal(t, tc.givenUpdateDeployment.GetName(), gotSTS.Name)
require.Equal(t, tc.givenUpdateDeployment.GetNamespace(), gotSTS.Namespace)
require.Equal(t, *tc.givenUpdateDeployment.Spec.Replicas, *gotSTS.Spec.Replicas)
})
Expand Down

0 comments on commit 7e2fba3

Please sign in to comment.