Skip to content

Commit c1f257d

Browse files
committed
feat: extend ADC environment configuration for provider type
- Allow dynamic configuration of ADC_BACKEND via `EnvKeyProviderType`.
1 parent a840f92 commit c1f257d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/e2e/scaffold/adc.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626

2727
adctypes "github.com/apache/apisix-ingress-controller/api/adc"
2828
"github.com/apache/apisix-ingress-controller/internal/provider/adc/translator"
29+
"github.com/apache/apisix-ingress-controller/test/e2e/framework"
2930
)
3031

3132
// DataplaneResource defines the interface for accessing dataplane resources
@@ -131,6 +132,9 @@ func (a *adcDataplaneResource) dumpResources(ctx context.Context) (*translator.T
131132
"ADC_SERVER=" + a.serverAddr,
132133
"ADC_TOKEN=" + a.token,
133134
}
135+
if providerType := os.Getenv(framework.EnvKeyProviderType); providerType != "" {
136+
adcEnv = append(adcEnv, "ADC_BACKEND="+providerType)
137+
}
134138

135139
var stdout, stderr bytes.Buffer
136140
cmd := exec.CommandContext(ctxWithTimeout, "adc", args...)

0 commit comments

Comments
 (0)