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

e2e Go-native test runner #20

Open
Tracked by #254
cardil opened this issue Oct 10, 2023 · 4 comments
Open
Tracked by #254

e2e Go-native test runner #20

cardil opened this issue Oct 10, 2023 · 4 comments
Labels
kind/enhancement triage/accepted Issues which should be fixed (post-triage)

Comments

@cardil
Copy link
Contributor

cardil commented Oct 10, 2023

Rewrite the e2e-tests.sh script (https://github.com/knative/hack/blob/main/README.md#using-the-e2e-testssh-helper-script) into a Golang tool knative.dev/toolbox/presubmit.

Invent new Go-native extension interface, for example:

# will look for Go files with `e2e` build constraints, that register configuration
go run knative.dev/toolbox/e2e@latest --run-tests

An example configuration might look like:

//go:build e2e
package test

import (
  "fmt"
  "os"

  "github.com/bitfield/script"
  "knative.dev/toolbox/e2e/pkg/config"
  "knative.dev/toolbox/e2e/pkg/commands/knative"
  "knative.dev/toolbox/e2e/pkg/commands/wait"
)

var waitForKnative = true

init {
  config.Configure(config.Hooks{
    KnativeSetup: function(ctx config.Context) error {
      if err := knative.StartServingLatest(); err != nil {
        return err
      }
      if waitForKnative {
        return wait.UntilPodsRunning("knative-serving")
      }
      return nil
    },
    DefineFlags: function(fs *flag.FlagSet) {
      fs.BoolVar(&waitForKnative, "wait-for-knative", true, "wait for Knative install?")
    },
    Tests: []config.E2eSuite{{
      Name:  "Istio",
      Dir:   "./...",
      Flags: ["--istio"],
    }},
  })
}
@cardil cardil changed the title e2e test runner e2e Go-native test runner Oct 11, 2023
@cardil cardil transferred this issue from knative/hack Oct 11, 2023
@mgencur
Copy link
Contributor

mgencur commented Nov 2, 2023

I have same question as #19 (comment) , it also applies to this issue.

Copy link

github-actions bot commented Feb 1, 2024

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 1, 2024
@github-actions github-actions bot closed this as completed Mar 3, 2024
@cardil
Copy link
Contributor Author

cardil commented Apr 5, 2024

/reopen
/remove-lifecycle stale
/triage accepted

@knative-prow knative-prow bot reopened this Apr 5, 2024
@knative-prow knative-prow bot added the triage/accepted Issues which should be fixed (post-triage) label Apr 5, 2024
Copy link

knative-prow bot commented Apr 5, 2024

@cardil: Reopened this issue.

In response to this:

/reopen
/remove-lifecycle stale
/triage accepted

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow knative-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
Development

No branches or pull requests

2 participants