This repository has been archived by the owner on Jun 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 225
Status conformance tests for channels #1154
Merged
knative-prow-robot
merged 2 commits into
knative:master
from
pierDipi:channel-conformance-status
Apr 22, 2020
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,18 @@ | ||
# Conformance tests | ||
|
||
Conformance tests verifies kantive eventing implementation for expected behavior | ||
described in | ||
[specification](https://github.com/knative/eventing/tree/master/docs/spec). | ||
|
||
## Running conformance tests | ||
|
||
Run test with e2e tag and optionally select conformance test | ||
|
||
> NOTE: Make sure you have built the | ||
> [test images](https://github.com/knative/eventing/tree/master/test#building-the-test-images)! | ||
|
||
```bash | ||
go test -v -tags=e2e -count=1 ./test/conformance/... | ||
|
||
go test -v -timeout 30s -tags e2e knative.dev/eventing/test/conformance -run ^TestChannelStatus$ -channels=messaging.knative.dev/v1alpha1:NatssChannel,messaging.knative.dev/v1alpha1:KafkaChannel | ||
pierDipi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` |
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,30 @@ | ||
//+build e2e | ||
|
||
/* | ||
Copyright 2020 The Knative 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 conformance | ||
|
||
import ( | ||
"testing" | ||
|
||
eventingconformancehelpers "knative.dev/eventing/test/conformance/helpers" | ||
"knative.dev/eventing/test/lib" | ||
) | ||
|
||
func TestChannelStatus(t *testing.T) { | ||
eventingconformancehelpers.ChannelStatusTestHelperWithChannelTestRunner(t, channelTestRunner, lib.SetupClientOptionNoop) | ||
} |
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,47 @@ | ||
/* | ||
Copyright 2020 The Knative 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 conformance | ||
|
||
import ( | ||
"log" | ||
"os" | ||
"testing" | ||
|
||
"knative.dev/eventing-contrib/test" | ||
eventingTest "knative.dev/eventing/test" | ||
"knative.dev/eventing/test/lib" | ||
"knative.dev/pkg/test/zipkin" | ||
) | ||
|
||
var channelTestRunner lib.ChannelTestRunner | ||
|
||
func TestMain(m *testing.M) { | ||
os.Exit(func() int { | ||
eventingTest.InitializeEventingFlags() | ||
channelTestRunner = lib.ChannelTestRunner{ | ||
ChannelFeatureMap: test.ChannelFeatureMap, | ||
ChannelsToTest: eventingTest.EventingFlags.Channels, | ||
} | ||
|
||
// Any tests may SetupZipkinTracing, it will only actually be done once. This should be the ONLY | ||
// place that cleans it up. If an individual test calls this instead, then it will break other | ||
// tests that need the tracing in place. | ||
defer zipkin.CleanupZipkinTracingSetup(log.Printf) | ||
|
||
return m.Run() | ||
}()) | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! thanks for doing this