This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Anonymous Eirininaut <[email protected]> Issue: cloudfoundry/eirini-release#182 Issue: cloudfoundry/eirini-release#184 Issue: cloudfoundry/eirini-release#185 Issue: cloudfoundry/eirini-release#187 Issue: cloudfoundry/eirini-release#186 Issue: cloudfoundry/eirini-release#183 Issue: cloudfoundry/eirini-release#192 Issue: cloudfoundry/eirini-release#193 Issue: cloudfoundry/eirini-release#194 Issue: cloudfoundry/eirini-release#191 Issue: cloudfoundry/eirini-release#196 Issue: cloudfoundry/eirini-release#199 Issue: cloudfoundry/eirini-release#200 Issue: cloudfoundry/eirini-release#201 Issue: cloudfoundry/eirini-release#202 Issue: cloudfoundry/eirini-release#204 Issue: cloudfoundry/eirini-release#205 Issue: cloudfoundry/eirini-release#195 Issue: cloudfoundry/eirini-release#198 Issue: cloudfoundry/eirini-release#211 Issue: cloudfoundry/eirini-release#212 Issue: cloudfoundry/eirini-release#207 Issue: cloudfoundry/eirini-release#190 Issue: cloudfoundry/eirini-release#209
- Loading branch information
Showing
10 changed files
with
224 additions
and
60 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 |
---|---|---|
|
@@ -22,6 +22,7 @@ type TaskClient struct { | |
jobs.Getter | ||
jobs.Deleter | ||
jobs.Lister | ||
jobs.Statuser | ||
} | ||
|
||
func NewTaskClient( | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
57 changes: 57 additions & 0 deletions
57
tests/integration/runtimeclient/runtimeclient_suite_test.go
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,57 @@ | ||
package integration_test | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
"time" | ||
|
||
eiriniv1 "code.cloudfoundry.org/eirini/pkg/apis/eirini/v1" | ||
"code.cloudfoundry.org/eirini/tests" | ||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
_ "k8s.io/client-go/plugin/pkg/client/auth" | ||
) | ||
|
||
var ( | ||
fixture *tests.Fixture | ||
ctx context.Context | ||
) | ||
|
||
var _ = BeforeSuite(func() { | ||
fixture = tests.NewFixture(GinkgoWriter) | ||
}) | ||
|
||
var _ = BeforeEach(func() { | ||
fixture.SetUp() | ||
ctx = context.Background() | ||
}) | ||
|
||
var _ = AfterEach(func() { | ||
fixture.TearDown() | ||
}) | ||
|
||
var _ = AfterSuite(func() { | ||
fixture.Destroy() | ||
}) | ||
|
||
func TestRuntimeclient(t *testing.T) { | ||
SetDefaultEventuallyTimeout(4 * time.Minute) | ||
RegisterFailHandler(Fail) | ||
RunSpecs(t, "Runtime Client") | ||
} | ||
|
||
func createTask(ns, name string) *eiriniv1.Task { | ||
task := &eiriniv1.Task{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: name, | ||
}, | ||
Spec: eiriniv1.TaskSpec{ | ||
Command: []string{"echo"}, | ||
}, | ||
} | ||
task, err := fixture.EiriniClientset.EiriniV1().Tasks(ns).Create(context.Background(), task, metav1.CreateOptions{}) | ||
|
||
Expect(err).NotTo(HaveOccurred()) | ||
return task | ||
} |
Oops, something went wrong.