Skip to content

Commit 03877e0

Browse files
authored
fix(ci): run e2e group by resource api group (#2431)
Signed-off-by: ashing <[email protected]>
1 parent b21d429 commit 03877e0

File tree

20 files changed

+155
-77
lines changed

20 files changed

+155
-77
lines changed

.github/workflows/apisix-conformance-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
- name: Format Conformance Test Report
123123
if: ${{ github.event_name == 'pull_request' }}
124124
run: |
125-
echo '# conformance test report' > report.md
125+
echo '# conformance test report - ${{ matrix.provider_type }} mode' > report.md
126126
echo '```yaml' >> report.md
127127
cat apisix-ingress-controller-conformance-report.yaml >> report.md
128128
echo '```' >> report.md

.github/workflows/apisix-e2e-test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ jobs:
5757
provider_type:
5858
- apisix-standalone
5959
- apisix
60+
cases_subset:
61+
- apisix.apache.org
62+
- networking.k8s.io
63+
fail-fast: false
6064
runs-on: ubuntu-latest
6165
steps:
6266
- name: Checkout
@@ -106,5 +110,6 @@ jobs:
106110
env:
107111
TEST_DIR: "./test/e2e/apisix/"
108112
PROVIDER_TYPE: ${{ matrix.provider_type }}
113+
TEST_LABEL: ${{ matrix.cases_subset }}
109114
run: |
110115
make e2e-test

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ kind-e2e-test: kind-up build-image kind-load-images e2e-test
127127
.PHONY: e2e-test
128128
e2e-test:
129129
@kind get kubeconfig --name $(KIND_NAME) > $$KUBECONFIG
130-
go test $(TEST_DIR) -test.timeout=$(TEST_TIMEOUT) -v -ginkgo.v -ginkgo.focus="$(TEST_FOCUS)"
130+
go test $(TEST_DIR) -test.timeout=$(TEST_TIMEOUT) -v -ginkgo.v -ginkgo.focus="$(TEST_FOCUS)" -ginkgo.label-filter="$(TEST_LABEL)"
131131

132132
.PHONY: conformance-test
133133
conformance-test:

config/rbac/gatewayproxy_editor_role.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

config/rbac/gatewayproxy_viewer_role.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

internal/provider/adc/executor.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ func (e *DefaultADCExecutor) buildCmdError(runErr error, stdout, stderr []byte)
117117

118118
func (e *DefaultADCExecutor) handleOutput(output []byte) error {
119119
var result adctypes.SyncResult
120-
if index := strings.IndexByte(string(output), '{'); index > 0 {
121-
log.Warnf("extra output: %s", string(output[:index]))
122-
output = output[index:]
120+
log.Debugf("adc output: %s", string(output))
121+
if lines := bytes.Split(output, []byte{'\n'}); len(lines) > 0 {
122+
output = lines[len(lines)-1]
123123
}
124124
if err := json.Unmarshal(output, &result); err != nil {
125125
log.Errorw("failed to unmarshal adc output",

test/e2e/apisix/basic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/apache/apisix-ingress-controller/test/e2e/scaffold"
2525
)
2626

27-
var _ = Describe("APISIX Standalone Basic Tests", func() {
27+
var _ = Describe("APISIX Standalone Basic Tests", Label("apisix.apache.org", "v2", "basic"), func() {
2828
s := scaffold.NewScaffold(&scaffold.Options{
2929
ControllerName: "apisix.apache.org/apisix-ingress-controller",
3030
})

test/e2e/apisix/consumer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333

3434
type Headers map[string]string
3535

36-
var _ = Describe("Test ApisixConsumer", func() {
36+
var _ = Describe("Test ApisixConsumer", Label("apisix.apache.org", "v2", "apisixconsumer"), func() {
3737
var (
3838
s = scaffold.NewScaffold(&scaffold.Options{
3939
ControllerName: "apisix.apache.org/apisix-ingress-controller",

test/e2e/apisix/globalrule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ spec:
6161
scope: "Namespace"
6262
`
6363

64-
var _ = Describe("Test GlobalRule", func() {
64+
var _ = Describe("Test GlobalRule", Label("apisix.apache.org", "v2", "apisixglobalrule"), func() {
6565
s := scaffold.NewScaffold(&scaffold.Options{
6666
ControllerName: "apisix.apache.org/apisix-ingress-controller",
6767
})

test/e2e/apisix/pluginconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ spec:
6464
scope: "Namespace"
6565
`
6666

67-
var _ = Describe("Test ApisixPluginConfig", func() {
67+
var _ = Describe("Test ApisixPluginConfig", Label("apisix.apache.org", "v2", "apisixpluginconfig"), func() {
6868
var (
6969
s = scaffold.NewScaffold(&scaffold.Options{
7070
ControllerName: "apisix.apache.org/apisix-ingress-controller",

0 commit comments

Comments
 (0)