gotest
CloudNativePG a Series of LF Projects, LLC.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.
SPDX-License-Identifier: Apache-2.0
Installation
dagger install github.com/cloudnative-pg/plugin-barman-cloud/dagger/gotest@4a94cb9daef6940ad425a7e349e51444ab92379cEntrypoint
Return Type
Gotest !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goVersion | String | "latest" | Go version |
| setupEnvtestVersion | String | "0.19.0" | setup-envtest version |
| kubeVersion | String | "1.31.0" | Kubernetes version |
| ctr | Container | - | Container to run the tests |
Example
dagger -m github.com/cloudnative-pg/plugin-barman-cloud/dagger/gotest@4a94cb9daef6940ad425a7e349e51444ab92379c call \
func (m *MyModule) Example() *dagger.Gotest {
return dag.
Gotest()
}@function
def example() -> dagger.Gotest:
return (
dag.gotest()
)@func()
example(): Gotest {
return dag
.gotest()
}Types
Gotest 🔗
unitTest() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory ! | - | Source directory |
Example
dagger -m github.com/cloudnative-pg/plugin-barman-cloud/dagger/gotest@4a94cb9daef6940ad425a7e349e51444ab92379c call \
unit-test --src DIR_PATHfunc (m *MyModule) Example(src *dagger.Directory) *dagger.Container {
return dag.
Gotest().
UnitTest(src)
}@function
def example(src: dagger.Directory) -> dagger.Container:
return (
dag.gotest()
.unit_test(src)
)@func()
example(src: Directory): Container {
return dag
.gotest()
.unitTest(src)
}