@@ -331,12 +331,19 @@ func RunKubernetesValidation(t *testing.T, config ProviderConfig, opts Kubernete
331331 }
332332 }()
333333
334- // Test: Create Kubernetes Cluster
334+ // Map the input subnet ref IDs to their real subnets
335+ subnetRefIDs := make (map [string ]* v1.Subnet )
336+ for _ , subnet := range vpc .GetSubnets () {
337+ subnetRefIDs [subnet .GetRefID ()] = subnet
338+ }
339+
340+ // Convert the input subnet ref IDs to their real subnet IDs
335341 subnetIDs := []v1.CloudProviderResourceID {}
336- for _ , subnet := range opts .NetworkOpts . Subnets {
337- subnetIDs = append (subnetIDs , v1 . CloudProviderResourceID ( subnet .RefID ))
342+ for _ , subnet := range opts .Subnets {
343+ subnetIDs = append (subnetIDs , subnetRefIDs [ subnet .RefID ]. GetID ( ))
338344 }
339345
346+ // Test: Create Kubernetes Cluster
340347 var clusterID v1.CloudProviderResourceID
341348 t .Run ("ValidateCreateKubernetesCluster" , func (t * testing.T ) {
342349 cluster , err := v1 .ValidateCreateKubernetesCluster (ctx , client , v1.CreateClusterArgs {
@@ -392,7 +399,8 @@ func RunKubernetesValidation(t *testing.T, config ProviderConfig, opts Kubernete
392399
393400 // Test: Get Kubernetes Cluster Credentials
394401 t .Run ("ValidateGetKubernetesClusterCredentials" , func (t * testing.T ) {
395- _ , err := v1 .ValidateGetKubernetesClusterCredentials (ctx , client , v1.PutClusterUserArgs {
402+ t .Skip ("Under development" )
403+ _ , err := v1 .ValidateSetKubernetesClusterUser (ctx , client , v1.SetClusterUserArgs {
396404 ClusterID : clusterID ,
397405 Username : opts .UserOpts .Username ,
398406 Role : opts .UserOpts .Role ,
@@ -442,8 +450,8 @@ func RunKubernetesValidation(t *testing.T, config ProviderConfig, opts Kubernete
442450 Predicate : func (nodeGroup * v1.NodeGroup ) bool {
443451 return nodeGroup .GetStatus () == v1 .NodeGroupStatusAvailable
444452 },
445- Timeout : 5 * time .Minute ,
446- Interval : 5 * time .Second ,
453+ Timeout : 20 * time .Minute ,
454+ Interval : 15 * time .Second ,
447455 })
448456 require .NoError (t , err , "WaitForKubernetesNodeGroupToBeAvailable should pass" )
449457 })
@@ -475,8 +483,8 @@ func RunKubernetesValidation(t *testing.T, config ProviderConfig, opts Kubernete
475483 nodeGroup .GetMinNodeCount () == opts .NodeGroupOpts .MinNodeCount + 1 &&
476484 nodeGroup .GetMaxNodeCount () == opts .NodeGroupOpts .MaxNodeCount + 1
477485 },
478- Timeout : 5 * time .Minute ,
479- Interval : 5 * time .Second ,
486+ Timeout : 20 * time .Minute ,
487+ Interval : 15 * time .Second ,
480488 })
481489 require .NoError (t , err , "WaitForKubernetesNodeGroupToBeAvailable should pass" )
482490 })
@@ -507,8 +515,8 @@ func RunKubernetesValidation(t *testing.T, config ProviderConfig, opts Kubernete
507515 Predicate : func (_ * v1.Cluster ) bool {
508516 return false // continue until failure
509517 },
510- Timeout : 5 * time .Minute ,
511- Interval : 5 * time .Second ,
518+ Timeout : 20 * time .Minute ,
519+ Interval : 15 * time .Second ,
512520 })
513521 require .ErrorIs (t , err , v1 .ErrResourceNotFound )
514522 clusterDeletionSucceeded = true
0 commit comments