Skip to content

Commit fef760d

Browse files
committed
try to fix e2e tests
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent d8ffbf4 commit fef760d

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

test/e2e/azure_selfhosted.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,11 @@ func SelfHostedSpec(ctx context.Context, inputGetter func() SelfHostedSpecInput)
205205
if selfHostedNamespace != nil {
206206
// Dump all Cluster API related resources to artifacts before pivoting back.
207207
framework.DumpAllResources(ctx, framework.DumpAllResourcesInput{
208-
Lister: selfHostedClusterProxy.GetClient(),
209-
Namespace: namespace.Name,
210-
LogPath: filepath.Join(input.ArtifactFolder, "clusters", clusterResources.Cluster.Name, "resources"),
208+
Lister: selfHostedClusterProxy.GetClient(),
209+
KubeConfigPath: selfHostedClusterProxy.GetKubeconfigPath(),
210+
ClusterctlConfigPath: clusterctlConfigPath,
211+
Namespace: namespace.Name,
212+
LogPath: filepath.Join(input.ArtifactFolder, "clusters", clusterResources.Cluster.Name, "resources"),
211213
})
212214
}
213215
if selfHostedCluster != nil {

test/e2e/common.go

+9-6
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,11 @@ func dumpSpecResourcesAndCleanup(ctx context.Context, input cleanupInput) {
164164
Logf("Dumping all the Cluster API resources in the %q namespace", input.Namespace.Name)
165165
// Dump all Cluster API related resources to artifacts before deleting them.
166166
framework.DumpAllResources(ctx, framework.DumpAllResourcesInput{
167-
Lister: input.ClusterProxy.GetClient(),
168-
Namespace: input.Namespace.Name,
169-
LogPath: filepath.Join(input.ArtifactFolder, "clusters", input.ClusterProxy.GetName(), "resources"),
167+
Lister: input.ClusterProxy.GetClient(),
168+
KubeConfigPath: input.ClusterProxy.GetKubeconfigPath(),
169+
ClusterctlConfigPath: clusterctlConfigPath,
170+
Namespace: input.Namespace.Name,
171+
LogPath: filepath.Join(input.ArtifactFolder, "clusters", input.ClusterProxy.GetName(), "resources"),
170172
})
171173

172174
if input.Cluster == nil {
@@ -189,9 +191,10 @@ func dumpSpecResourcesAndCleanup(ctx context.Context, input cleanupInput) {
189191
deleteTimeoutConfig = "wait-delete-cluster-aks"
190192
}
191193
framework.DeleteAllClustersAndWait(ctx, framework.DeleteAllClustersAndWaitInput{
192-
ClusterProxy: input.ClusterProxy,
193-
Namespace: input.Namespace.Name,
194-
ArtifactFolder: input.ArtifactFolder,
194+
ClusterProxy: input.ClusterProxy,
195+
ClusterctlConfigPath: clusterctlConfigPath,
196+
Namespace: input.Namespace.Name,
197+
ArtifactFolder: input.ArtifactFolder,
195198
}, input.IntervalsGetter(input.SpecName, deleteTimeoutConfig)...)
196199

197200
Logf("Deleting namespace used for hosting the %q test spec", input.SpecName)

test/logger.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ func collectManagementClusterLogs(bootstrapClusterProxy *e2e.AzureClusterProxy,
9494
}
9595

9696
framework.DumpAllResources(context.TODO(), framework.DumpAllResourcesInput{
97-
Lister: bootstrapClusterProxy.GetClient(),
98-
Namespace: *namespace,
99-
LogPath: workLoadClusterLogPath,
97+
Lister: bootstrapClusterProxy.GetClient(),
98+
KubeConfigPath: bootstrapClusterProxy.GetKubeconfigPath(),
99+
Namespace: *namespace,
100+
LogPath: workLoadClusterLogPath,
100101
})
101102
}
102103

0 commit comments

Comments
 (0)