Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Issue: #
  • Loading branch information
jmintb authored and Jessie Chatham Spencer committed Aug 3, 2023
1 parent 889ecf0 commit 3a79b55
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 36 deletions.
22 changes: 0 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ humantime = {version = "2.1.0", optional = true}
either = {version = "1.9.0", optional = true}
rand = {version = "*", optional = true}
cron-parser = "0.8.0"
macros = { version = "0.1.0", path = "../macros" }
anyhow = "1.0.72"
serde_with = "3.1.0"

Expand Down
2 changes: 1 addition & 1 deletion lib/src/custom_resources/new_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ mod test {
executor_image: "myimage".to_string(),
task_volume: "myvolume".to_string(),
required_data_sets: vec![],
service_account: "ame-system".to_string(),
service_account: "ame-task".to_string(),
};

insta::assert_yaml_snapshot!(build_workflow(task, task_ctx)?);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ spec:
project: ~
resources:
cpu: "2"
fromTemplate: ~
artifactCfg: ~
triggers: ~
env:
- key: SOME_VAR
val: someval
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
---
source: lib/src/custom_resources/project.rs
expression: "&project.spec.models.unwrap()[0].generate_model_ingress(&ctrl_cfg)?"
expression: "&project.spec.cfg.models[0].generate_model_ingress(\"\".to_string(), None,\n \"projectname\".to_string())?"
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/ssl-redirect: "false"
labels:
ame-model: test
name: test
spec:
ingressClassName: nginx
rules:
- host: testhost
- host: ""
http:
paths:
- backend:
service:
name: test
port:
number: 5000
path: /invocations
pathType: ImplementationSpecific
path: /projects/projectname/models/test(/|$)(.*)
pathType: Prefix
tls:
- hosts:
- testhost
- ""
secretName: test-tls

Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ metadata:
uid: ""
spec:
name: mytask
taskRef: ~
resources: {}
env: []
secrets: []
executor:
pipEnv:
command: test cmd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ expression: "&projects"
- name: echo
tasks:
- name: echo
taskRef: ~
resources:
memory: 4Gi
cpu: "2"
memory: 4Gi
env: []
secrets: []
executor: ~
deletionApproved: false
enableTriggers: false

2 changes: 1 addition & 1 deletion test_data/test_projects/invalid_project/ame.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: [poetry]
models:
daa_sets:
data_sets:
templates:
tasks:
- name: crontraining
Expand Down

0 comments on commit 3a79b55

Please sign in to comment.