Skip to content

Commit

Permalink
Fix review last comments
Browse files Browse the repository at this point in the history
Signed-off-by: David Festal <dfestal@redhat.com>
  • Loading branch information
davidfestal committed Feb 7, 2023
1 parent 0da8dad commit 17a6ba8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/e2e/framework/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@ func (sf *syncerFixture) Create(t *testing.T) *appliedSyncerFixture {

useDeployedSyncer := len(TestConfig.PClusterKubeconfig()) > 0

var (
downstreamConfig *rest.Config
downstreamKubeconfigPath string
syncerID string
)

// Write the upstream logical cluster config to disk for the workspace plugin
upstreamRawConfig, err := sf.upstreamServer.RawConfig()
require.NoError(t, err)
Expand Down Expand Up @@ -183,6 +177,8 @@ func (sf *syncerFixture) Create(t *testing.T) *appliedSyncerFixture {
}
syncerYAML := RunKcpCliPlugin(t, kubeconfigPath, pluginArgs)

var downstreamConfig *rest.Config
var downstreamKubeconfigPath string
if useDeployedSyncer {
// The syncer will target the pcluster identified by `--pcluster-kubeconfig`.
downstreamKubeconfigPath = TestConfig.PClusterKubeconfig()
Expand Down Expand Up @@ -273,6 +269,7 @@ func (sf *syncerFixture) Create(t *testing.T) *appliedSyncerFixture {
// Extract the configuration for an in-process syncer from the resources that were
// applied to the downstream server. This maximizes the parity between the
// configuration of a deployed and in-process syncer.
var syncerID string
for _, doc := range strings.Split(string(syncerYAML), "\n---\n") {
var manifest struct {
metav1.ObjectMeta `json:"metadata"`
Expand Down

0 comments on commit 17a6ba8

Please sign in to comment.