-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: allow disabling addons in tests (#334)
- Loading branch information
Showing
5 changed files
with
69 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package test | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"strings" | ||
) | ||
|
||
// IsCalicoCNIDisabled returns true if the Calico CNI plugin is disabled in the test environment. | ||
func IsCalicoCNIDisabled() bool { | ||
ret := strings.ToLower(os.Getenv("KONG_TEST_DISABLE_CALICO")) == "true" | ||
if ret { | ||
fmt.Println("INFO: CalicoCNI plugin is disabled") | ||
} else { | ||
fmt.Println("INFO: CalicoCNI plugin is enabled") | ||
} | ||
return ret | ||
} | ||
|
||
// IsCertManagerDisabled returns true if the Cert-Manager is disabled in the test environment. | ||
func IsCertManagerDisabled() bool { | ||
ret := strings.ToLower(os.Getenv("KONG_TEST_DISABLE_CERTMANAGER")) == "true" | ||
if ret { | ||
fmt.Println("INFO: CertManager plugin is disabled") | ||
} else { | ||
fmt.Println("INFO: CertManager plugin is enabled") | ||
} | ||
return ret | ||
} | ||
|
||
// IsMetalLBDisabled returns true if the MetalLB is disabled in the test environment. | ||
func IsMetalLBDisabled() bool { | ||
ret := strings.ToLower(os.Getenv("KONG_TEST_DISABLE_METALLB")) == "true" | ||
if ret { | ||
fmt.Println("INFO: MetalLB plugin is disabled") | ||
} else { | ||
fmt.Println("INFO: MetalLB plugin is enabled") | ||
} | ||
return ret | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters