@@ -33,14 +33,14 @@ import (
3333 "github.com/kube-bind/kube-bind/test/e2e/framework"
3434)
3535
36- func performBindingWithBrowser (t * testing.T , backendAddr string , clusterID string , consumerCfg * rest.Config , consumerKubeconfig , resource string ) {
36+ func performBindingWithBrowser (t * testing.T , backendAddr string , clusterID string , consumerCfg * rest.Config , consumerKubeconfig , resource , template string ) {
3737 bindURL := fmt .Sprintf ("http://%s/clusters/%s/exports" , backendAddr , clusterID )
3838 t .Logf ("Bind URL: %s" , bindURL )
3939
4040 // Test binding dry run first (similar to happy-case test)
4141 t .Run ("Service is bound dry run" , func (t * testing.T ) {
4242 authURLDryRunCh := make (chan string , 1 )
43- go simulateKCPBrowser (t , authURLDryRunCh , resource )
43+ go simulateKCPBrowser (t , authURLDryRunCh , template )
4444
4545 iostreams , _ , bufOut , _ := genericclioptions .NewTestIOStreams ()
4646 framework .Bind (t , iostreams , authURLDryRunCh , nil , bindURL , "--kubeconfig" , consumerKubeconfig , "--dry-run" )
@@ -51,7 +51,7 @@ func performBindingWithBrowser(t *testing.T, backendAddr string, clusterID strin
5151 // Perform actual binding (similar to happy-case test)
5252 t .Run ("Service is bound" , func (t * testing.T ) {
5353 authURLCh := make (chan string , 1 )
54- go simulateKCPBrowser (t , authURLCh , resource )
54+ go simulateKCPBrowser (t , authURLCh , template )
5555
5656 iostreams , _ , _ , _ := genericclioptions .NewTestIOStreams ()
5757 invocations := make (chan framework.SubCommandInvocation , 1 )
@@ -78,8 +78,8 @@ func performBindingWithBrowser(t *testing.T, backendAddr string, clusterID strin
7878 })
7979}
8080
81- // simulateKCPBrowser simulates browser interaction for KCP binding.
82- func simulateKCPBrowser (t * testing.T , authURLCh chan string , resource string ) {
81+ // simulateKCPBrowser simulates browser interaction for KCP binding using templates .
82+ func simulateKCPBrowser (t * testing.T , authURLCh chan string , template string ) {
8383 browser := surf .NewBrowser ()
8484 authURL := <- authURLCh
8585
@@ -90,9 +90,9 @@ func simulateKCPBrowser(t *testing.T, authURLCh chan string, resource string) {
9090 t .Logf ("Waiting for browser to be at /resources" )
9191 framework .BrowserEventuallyAtPath (t , browser , "/resources" )
9292
93- t .Logf ("Clicking %s resource " , resource )
94- err = browser .Click ("a." + resource )
95- require .NoError (t , err , "Failed to click resource link" )
93+ t .Logf ("Clicking %s template " , template )
94+ err = browser .Click ("a." + template )
95+ require .NoError (t , err , "Failed to click template link" )
9696
9797 t .Logf ("Waiting for browser to be forwarded to client" )
9898 framework .BrowserEventuallyAtPath (t , browser , "/callback" )
0 commit comments