github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/cmd/chore/e2e/run/upgrade.go (about)

     1  package main
     2  
     3  import (
     4  	"context"
     5  	"fmt"
     6  	"time"
     7  )
     8  
     9  func upgrade(k8sVersion string) testFunc {
    10  	return func(_ *testSpecs, settings programSettings, conditions *conditions) interactFunc {
    11  
    12  		conditions.kubernetes.Versions.Kubernetes = k8sVersion
    13  		conditions.orbiter.watcher = watch(60*time.Minute, orbiter)
    14  		conditions.testCase = nil
    15  
    16  		return func(ctx context.Context, _ uint8, orbctl newOrbctlCommandFunc) error {
    17  
    18  			return patch(ctx, settings, orbctl, fmt.Sprintf("clusters.%s.spec.versions.kubernetes", settings.orbID), k8sVersion)
    19  		}
    20  	}
    21  }