Documentation ¶
Overview ¶
Copyright 2024.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func AssertErrorMatch(t *testing.T, s string, e error)
- func AssertNoError(t *testing.T, err error)
- func AssertNotFound(t *testing.T, err error)
- func GetNonEmptyLines(output string) []string
- func GetProjectDir() (string, error)
- func InstallCertManager() error
- func InstallPrometheusOperator() error
- func LoadImageToKindClusterWithName(name string) error
- func MakeGitHubAPIServer(t *testing.T, authToken, wantPath, etag string, response []byte) *httptest.Server
- func MatchErrorString(t *testing.T, s string, e error) bool
- func NewSecret(data map[string]string, opts ...func(*corev1.Secret)) *corev1.Secret
- func Run(cmd *exec.Cmd) ([]byte, error)
- func UninstallCertManager()
- func UninstallPrometheusOperator()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertErrorMatch ¶
AssertErrorMatch will fail if the error doesn't match the provided error.
func AssertNoError ¶
AssertNoError will fail if the provided err value is an error.
func AssertNotFound ¶
AssertNotFound will fail if the provided err value not a NotFound error from the K8s client API.
func GetNonEmptyLines ¶
GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.
func GetProjectDir ¶
GetProjectDir will return the directory where the project is
func InstallCertManager ¶
func InstallCertManager() error
InstallCertManager installs the cert manager bundle.
func InstallPrometheusOperator ¶
func InstallPrometheusOperator() error
InstallPrometheusOperator installs the prometheus Operator to be used to export the enabled metrics.
func LoadImageToKindClusterWithName ¶
LoadImageToKindClusterWithName loads a local docker image to the kind cluster
func MakeGitHubAPIServer ¶
func MakeGitHubAPIServer(t *testing.T, authToken, wantPath, etag string, response []byte) *httptest.Server
MakeGitHubAPIServer is used during testing to create an HTTP server to return fixtures if the request matches.
func MatchErrorString ¶
MatchErrorString takes a string and matches on the error and returns true if the string matches the error.
This is useful in table tests.
If the string can't be compiled as an regexp, then this will fail with a Fatal error.
func NewSecret ¶
NewSecret creates and returns a new Secret.
The data is converted to map[string][]byte as a convenience.
func UninstallCertManager ¶
func UninstallCertManager()
UninstallCertManager uninstalls the cert manager
func UninstallPrometheusOperator ¶
func UninstallPrometheusOperator()
UninstallPrometheusOperator uninstalls the prometheus
Types ¶
This section is empty.