knative.dev/pkg@v0.0.0-20260602142205-ac97e43f6622/test/upgrade/private_types.go (about)

     1  /*
     2  Copyright 2020 The Knative Authors
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package upgrade
    18  
    19  type suiteExecution struct {
    20  	suite         *enrichedSuite
    21  	configuration Configuration
    22  }
    23  
    24  type enrichedSuite struct {
    25  	installations Installations
    26  	tests         enrichedTests
    27  }
    28  
    29  type enrichedTests struct {
    30  	preUpgrade    []Operation
    31  	postUpgrade   []Operation
    32  	postDowngrade []Operation
    33  	continual     []stoppableOperation
    34  }
    35  
    36  type stoppableOperation struct {
    37  	BackgroundOperation
    38  	stop chan struct{}
    39  }
    40  
    41  type operationGroup struct {
    42  	num                   int
    43  	operations            []Operation
    44  	groupName             string
    45  	groupTemplate         string
    46  	elementTemplate       string
    47  	skippingGroupTemplate string
    48  }
    49  
    50  type simpleOperation struct {
    51  	name    string
    52  	handler func(c Context)
    53  }
    54  
    55  type simpleBackgroundOperation struct {
    56  	name    string
    57  	setup   func(c Context)
    58  	handler func(bc BackgroundContext)
    59  }