Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Added jobSpec to create test job in e2e #425

Closed
k82cn opened this issue Oct 14, 2018 · 2 comments
Closed

Added jobSpec to create test job in e2e #425

k82cn opened this issue Oct 14, 2018 · 2 comments
Labels
area/test good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Milestone

Comments

@k82cn
Copy link
Contributor

k82cn commented Oct 14, 2018

DESCRIPTION: -- symptom of the problem a customer would see

Currently, we use createJob with several parameters to create test jobs. There're two major issues:

  1. if added one more field for Job to set, we need to update all related test cases
  2. we can not create multiple jobs with same podgroup

It's better to introduce a test struct, named jobSpec, to cover that; for example

type jobSpec struct {
	name       string
	podgroup   string
	scheduler  string
	min, rep   int32
	img        string
	hostport   int32
	req        v1.ResourceList
	affinity   *v1.Affinity
	labels     map[string]string
	containers []v1.Container
}

func createJobs(
	context *context,
	jobs []jobSpec,
) ([]*batchv1.Job, []*PodGroup) {
    ...
}
@k82cn k82cn added area/test kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Oct 14, 2018
@k82cn k82cn added this to the v0.3 milestone Oct 14, 2018
@k82cn
Copy link
Contributor Author

k82cn commented Oct 16, 2018

/close

All e2e are updated.

@k8s-ci-robot
Copy link
Contributor

@k82cn: Closing this issue.

In response to this:

/close

All e2e are updated.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/test good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

No branches or pull requests

2 participants