-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: unify provided templates and testOutline
- Change the docs reflecting the changes - Move all the provided templates and testOutline into a new templates/default directory
- Loading branch information
Showing
4 changed files
with
108 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package {{ .CustomData.PackageName }} | ||
|
||
/* This was generated from a template file. Please feel free to update as necessary! | ||
a couple things to note: | ||
- Remember to implement specific logic of the service/domain you are trying to test if it not already there in the pkg/ | ||
|
||
- To include the tests as part of the E2E Test suite: | ||
- Update the pkg/framework/describe.go to include the `Describe func` of this new test suite, If you haven't already done so. | ||
- Import this new package into the cmd/e2e_test.go | ||
*/ | ||
|
||
import ( | ||
// Imports here | ||
) | ||
|
||
{{ range .CustomData.Outline }} | ||
var _ = framework.{{ .Name }}("{{ .Text }}", {{ range .Labels }}Label("{{.}}"), {{ end }} func() { | ||
// Setup here | ||
|
||
// Generated specs: | ||
{{ template "specs" . }} | ||
}) | ||
{{ end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package {{ .CustomData.PackageName }} | ||
|
||
/* This was generated from a template file. Please feel free to update as necessary! | ||
a couple things to note: | ||
- Remember to implement specific logic of the service/domain you are trying to test if it not already there in the pkg/ | ||
|
||
- To include the tests as part of the E2E Test suite: | ||
- Update the pkg/framework/describe.go to include the `Describe func` of this new test suite, If you haven't already done so. | ||
- Import this new package into the cmd/e2e_test.go | ||
*/ | ||
|
||
import ( | ||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
|
||
"fmt" | ||
"strings" | ||
"time" | ||
"encoding/json" | ||
"context" | ||
|
||
|
||
"github.com/redhat-appstudio/e2e-tests/pkg/framework" | ||
//framework imports edit as required | ||
"github.com/redhat-appstudio/e2e-tests/pkg/constants" | ||
"github.com/redhat-appstudio/e2e-tests/pkg/utils" | ||
|
||
) | ||
|
||
{{ range .CustomData.Outline }} | ||
var _ = framework.{{ .Name }}("{{ .Text }}", {{range .Labels }}Label("{{.}}"), {{ end }} func() { | ||
defer GinkgoRecover() | ||
var err error | ||
var f *framework.Framework | ||
// use 'f' to access common controllers or the specific service controllers within the framework | ||
BeforeAll(func() { | ||
// Initialize the tests controllers | ||
f, err = framework.NewFramework() | ||
Expect(err).NotTo(HaveOccurred()) | ||
}) | ||
|
||
// Generated specs: | ||
{{ template "specs" . }} | ||
}) | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
BuildSuiteDescribe: Build service E2E tests @build, @HACBS | ||
Describe: test PaC component build @github-webhook, @pac-build, @pipeline | ||
When: a new component without specified branch is created @pac-custom-default-branch | ||
It: correctly targets the default branch (that is not named 'main') with PaC | ||
It: triggers a PipelineRun | ||
It: a related PipelineRun and Github webhook should be deleted after deleting the component | ||
It: PR branch should not exists in the repo | ||
When: a new component with specified custom branch branch is created | ||
It: triggers a PipelineRun | ||
It: should lead to a PaC init PR creation | ||
It: the PipelineRun should eventually finish successfully | ||
It: eventually leads to a creation of a PR comment with the PipelineRun status report | ||
When: the PaC init branch is updated | ||
It: eventually leads to triggering another PipelineRun | ||
It: PipelineRun should eventually finish | ||
It: eventually leads to another update of a PR with a comment about the PipelineRun status report | ||
When: the PaC init branch is merged | ||
It: eventually leads to triggering another PipelineRun | ||
It: pipelineRun should eventually finish | ||
When: the component is removed and recreated (with the same name in the same namespace) | ||
It: should no longer lead to a creation of a PaC PR | ||
|
||
Describe: Creating component with container image source | ||
It: should not trigger a PipelineRun | ||
|
||
Describe: PLNSRVCE-799 - test pipeline selector @pipeline-selector | ||
It: a specific Pipeline bundle should be used and additional pipeline params should be added to the PipelineRun if all WhenConditions match | ||
It: default Pipeline bundle should be used and no additional Pipeline params should be added to the PipelineRun if one of the WhenConditions does not match | ||
|
||
Describe: A secret with dummy quay.io credentials is created in the testing namespace | ||
It: should override the shared secret | ||
It: should not be possible to push to quay.io repo (PipelineRun should fail) |