This repository has been archived by the owner on Mar 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: default cc project spec and status fields
Add tests and update affected goldenfiles. Signed-off-by: Nick Hale <[email protected]>
- Loading branch information
Showing
34 changed files
with
302 additions
and
8 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
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
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
5 changes: 5 additions & 0 deletions
5
pkg/controller/scheduling/testdata/memory/all-set-overwrite/existing.yaml
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
5 changes: 5 additions & 0 deletions
5
pkg/controller/scheduling/testdata/memory/all-set/existing.yaml
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
5 changes: 5 additions & 0 deletions
5
pkg/controller/scheduling/testdata/memory/container/existing.yaml
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
5 changes: 5 additions & 0 deletions
5
pkg/controller/scheduling/testdata/memory/overwrite-acornfile-memory/existing.yaml
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
5 changes: 5 additions & 0 deletions
5
pkg/controller/scheduling/testdata/memory/removed-container/existing.yaml
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
5 changes: 5 additions & 0 deletions
5
pkg/controller/scheduling/testdata/memory/sidecar/existing.yaml
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
5 changes: 5 additions & 0 deletions
5
pkg/controller/scheduling/testdata/memory/two-containers/existing.yaml
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
5 changes: 5 additions & 0 deletions
5
pkg/controller/scheduling/testdata/memory/with-acornfile-memory/existing.yaml
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
5 changes: 5 additions & 0 deletions
5
pkg/controller/scheduling/testdata/tolerations/container/existing.yaml
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
5 changes: 5 additions & 0 deletions
5
pkg/controller/scheduling/testdata/tolerations/job/existing.yaml
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
5 changes: 5 additions & 0 deletions
5
pkg/controller/scheduling/testdata/tolerations/removed-container/existing.yaml
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,5 @@ | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace |
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
9 changes: 9 additions & 0 deletions
9
pkg/project/testdata/setdefaultcomputeclass/cc-missing/expected.golden
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,9 @@ | ||
`apiVersion: internal.acorn.io/v1 | ||
kind: ProjectInstance | ||
metadata: | ||
creationTimestamp: null | ||
name: acorn | ||
spec: | ||
defaultComputeClass: compute-class-a | ||
status: {} | ||
` |
8 changes: 8 additions & 0 deletions
8
pkg/project/testdata/setdefaultcomputeclass/cc-missing/input.yaml
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,8 @@ | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: acorn | ||
spec: | ||
defaultComputeClass: compute-class-a | ||
status: | ||
defaultComputeClass: compute-class-a |
44 changes: 44 additions & 0 deletions
44
pkg/project/testdata/setdefaultcomputeclass/spec-only/existing.yaml
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,44 @@ | ||
--- | ||
kind: ProjectComputeClassInstance | ||
apiVersion: internal.admin.acorn.io/v1 | ||
metadata: | ||
name: compute-class-a | ||
namespace: acorn | ||
cpuScaler: 0.25 | ||
memory: | ||
min: 1Mi # 1Mi | ||
max: 2Mi # 2Mi | ||
default: 1Mi # 1Mi | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: foo | ||
operator: In | ||
values: | ||
- bar | ||
--- | ||
kind: ClusterComputeClassInstance | ||
apiVersion: internal.admin.acorn.io/v1 | ||
metadata: | ||
name: cluster-compute-class-b | ||
cpuScaler: 0.25 | ||
memory: | ||
min: 1Mi # 1Mi | ||
max: 2Mi # 2Mi | ||
default: 1Mi # 1Mi | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: foo | ||
operator: In | ||
values: | ||
- bar | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: acorn |
10 changes: 10 additions & 0 deletions
10
pkg/project/testdata/setdefaultcomputeclass/spec-only/expected.golden
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,10 @@ | ||
`apiVersion: internal.acorn.io/v1 | ||
kind: ProjectInstance | ||
metadata: | ||
creationTimestamp: null | ||
name: acorn | ||
spec: | ||
defaultComputeClass: cluster-compute-class-b | ||
status: | ||
defaultComputeClass: cluster-compute-class-b | ||
` |
6 changes: 6 additions & 0 deletions
6
pkg/project/testdata/setdefaultcomputeclass/spec-only/input.yaml
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,6 @@ | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: acorn | ||
spec: | ||
defaultComputeClass: cluster-compute-class-b |
46 changes: 46 additions & 0 deletions
46
pkg/project/testdata/setdefaultcomputeclass/spec-override/existing.yaml
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,46 @@ | ||
--- | ||
kind: ProjectComputeClassInstance | ||
apiVersion: internal.admin.acorn.io/v1 | ||
metadata: | ||
name: compute-class-a | ||
namespace: acorn | ||
cpuScaler: 0.25 | ||
memory: | ||
min: 1Mi # 1Mi | ||
max: 2Mi # 2Mi | ||
default: 1Mi # 1Mi | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: foo | ||
operator: In | ||
values: | ||
- bar | ||
--- | ||
kind: ClusterComputeClassInstance | ||
apiVersion: internal.admin.acorn.io/v1 | ||
metadata: | ||
name: cluster-compute-class-b | ||
cpuScaler: 0.25 | ||
memory: | ||
min: 1Mi # 1Mi | ||
max: 2Mi # 2Mi | ||
default: 1Mi # 1Mi | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: foo | ||
operator: In | ||
values: | ||
- bar | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: acorn | ||
status: | ||
defaultComputeClass: cluster-compute-class-b |
10 changes: 10 additions & 0 deletions
10
pkg/project/testdata/setdefaultcomputeclass/spec-override/expected.golden
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,10 @@ | ||
`apiVersion: internal.acorn.io/v1 | ||
kind: ProjectInstance | ||
metadata: | ||
creationTimestamp: null | ||
name: acorn | ||
spec: | ||
defaultComputeClass: compute-class-a | ||
status: | ||
defaultComputeClass: compute-class-a | ||
` |
6 changes: 6 additions & 0 deletions
6
pkg/project/testdata/setdefaultcomputeclass/spec-override/input.yaml
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,6 @@ | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: acorn | ||
spec: | ||
defaultComputeClass: compute-class-a |
46 changes: 46 additions & 0 deletions
46
pkg/project/testdata/setdefaultcomputeclass/status-only/existing.yaml
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,46 @@ | ||
--- | ||
kind: ProjectComputeClassInstance | ||
apiVersion: internal.admin.acorn.io/v1 | ||
metadata: | ||
name: compute-class-a | ||
namespace: acorn | ||
cpuScaler: 0.25 | ||
memory: | ||
min: 1Mi # 1Mi | ||
max: 2Mi # 2Mi | ||
default: 1Mi # 1Mi | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: foo | ||
operator: In | ||
values: | ||
- bar | ||
--- | ||
kind: ClusterComputeClassInstance | ||
apiVersion: internal.admin.acorn.io/v1 | ||
metadata: | ||
name: cluster-compute-class-b | ||
cpuScaler: 0.25 | ||
memory: | ||
min: 1Mi # 1Mi | ||
max: 2Mi # 2Mi | ||
default: 1Mi # 1Mi | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: foo | ||
operator: In | ||
values: | ||
- bar | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: acorn | ||
status: | ||
defaultComputeClass: cluster-compute-class-b |
Oops, something went wrong.