github.com/verrazzano/verrazzano@v1.7.1/tests/e2e/clusterapi/capi/utils.go (about)

     1  // Copyright (c) 2023, Oracle and/or its affiliates.
     2  // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     3  
     4  package capi
     5  
     6  import "os"
     7  
     8  func checkAll(data []bool) bool {
     9  	for _, item := range data {
    10  		// return false if any item is false
    11  		if !item {
    12  			return false
    13  		}
    14  	}
    15  	return true
    16  }
    17  
    18  func getEnvDefault(key, defaultValue string) string {
    19  	value, ok := os.LookupEnv(key)
    20  	if !ok {
    21  		return defaultValue
    22  	}
    23  	return value
    24  }