Skip to content

Commit 625fa21

Browse files
committed
tests fixed
1 parent 77accb3 commit 625fa21

File tree

3 files changed

+35
-18
lines changed

3 files changed

+35
-18
lines changed

test/import.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,5 @@ let write_spec path image =
100100
let spec = `Assoc [(`Keyword (None, "spec")),
101101
`Assoc [(`Keyword (None, "Image"), `String image)];
102102
(`Keyword (None, "deploy")),
103-
`Vector [(`Keyword (None, "after")); `Int 1]] in
103+
`Vector [(`Keyword (None, "After")); `Int 1]] in
104104
Writer.save path (Edn.to_string spec)

test/instance_test.ml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,50 +33,58 @@ let%expect_test "basic" =
3333
(spec
3434
((deploy (After 1))
3535
(spec (Assoc ((Image (String prepor/condo-test:good)))))
36-
(health_timeout 10) (stop_timeout 10)))))
36+
(health_timeout 10) (stop_timeout 10)))
37+
(created_at .+) (stable_at ()))) (regexp)
3738
condo_spec --> New state: (Stable
3839
((id .+) (regexp)
3940
(spec
4041
((deploy (After 1))
4142
(spec (Assoc ((Image (String prepor/condo-test:good)))))
42-
(health_timeout 10) (stop_timeout 10)))))
43+
(health_timeout 10) (stop_timeout 10)))
44+
(created_at .+) (stable_at (.+)))) (regexp)
4345
Pulling image prepor/condo-test:good2
4446
condo_spec --> New state: (WaitNext
4547
(((id .+) (regexp)
4648
(spec
4749
((deploy (After 1))
4850
(spec (Assoc ((Image (String prepor/condo-test:good)))))
49-
(health_timeout 10) (stop_timeout 10))))
51+
(health_timeout 10) (stop_timeout 10)))
52+
(created_at .+) (stable_at (.+))) (regexp)
5053
((id .+) (regexp)
5154
(spec
5255
((deploy (After 1))
5356
(spec (Assoc ((Image (String prepor/condo-test:good2)))))
54-
(health_timeout 10) (stop_timeout 10))))))
57+
(health_timeout 10) (stop_timeout 10)))
58+
(created_at .+) (stable_at ())))) (regexp)
5559
condo_spec --> New state: (Stable
5660
((id .+) (regexp)
5761
(spec
5862
((deploy (After 1))
5963
(spec (Assoc ((Image (String prepor/condo-test:good2)))))
60-
(health_timeout 10) (stop_timeout 10)))))
64+
(health_timeout 10) (stop_timeout 10)))
65+
(created_at .+) (stable_at ()))) (regexp)
6166
Pulling image prepor/condo-test:bad
6267
condo_spec --> New state: (WaitNext
6368
(((id .+) (regexp)
6469
(spec
6570
((deploy (After 1))
6671
(spec (Assoc ((Image (String prepor/condo-test:good2)))))
67-
(health_timeout 10) (stop_timeout 10))))
72+
(health_timeout 10) (stop_timeout 10)))
73+
(created_at .+) (stable_at ())) (regexp)
6874
((id .+) (regexp)
6975
(spec
7076
((deploy (After 1))
7177
(spec (Assoc ((Image (String prepor/condo-test:bad)))))
72-
(health_timeout 10) (stop_timeout 10))))))
78+
(health_timeout 10) (stop_timeout 10)))
79+
(created_at .+) (stable_at ())))) (regexp)
7380
test.native: [WARNING] condo_spec --> Health checked not passed in 10 secs
7481
condo_spec --> New state: (TryAgainNext
7582
(((id .+) (regexp)
7683
(spec
7784
((deploy (After 1))
7885
(spec (Assoc ((Image (String prepor/condo-test:good2)))))
79-
(health_timeout 10) (stop_timeout 10))))
86+
(health_timeout 10) (stop_timeout 10)))
87+
(created_at .+) (stable_at ())) (regexp)
8088
((deploy (After 1)) (spec (Assoc ((Image (String prepor/condo-test:bad)))))
8189
(health_timeout 10) (stop_timeout 10))
8290
.+)) (regexp)
@@ -86,17 +94,20 @@ let%expect_test "basic" =
8694
(spec
8795
((deploy (After 1))
8896
(spec (Assoc ((Image (String prepor/condo-test:good2)))))
89-
(health_timeout 10) (stop_timeout 10))))
97+
(health_timeout 10) (stop_timeout 10)))
98+
(created_at .+) (stable_at ())) (regexp)
9099
((id .+) (regexp)
91100
(spec
92101
((deploy (After 1))
93102
(spec (Assoc ((Image (String prepor/condo-test:good)))))
94-
(health_timeout 10) (stop_timeout 10))))))
103+
(health_timeout 10) (stop_timeout 10)))
104+
(created_at .+) (stable_at ())))) (regexp)
95105
condo_spec --> New state: (Stable
96106
((id .+) (regexp)
97107
(spec
98108
((deploy (After 1))
99109
(spec (Assoc ((Image (String prepor/condo-test:good)))))
100-
(health_timeout 10) (stop_timeout 10)))))
110+
(health_timeout 10) (stop_timeout 10)))
111+
(created_at .+) (stable_at ()))) (regexp)
101112
condo_spec --> Stop
102113
condo_spec --> New state: Init |}]

test/supervisor_test.ml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,31 @@ let%expect_test "basic" =
2727
(spec
2828
((deploy (After 1))
2929
(spec (Assoc ((Image (String prepor/condo-test:good)))))
30-
(health_timeout 10) (stop_timeout 10)))))
30+
(health_timeout 10) (stop_timeout 10)))
31+
(created_at .+) (stable_at ()))) (regexp)
3132
spec1 --> New state: (Stable
3233
((id .+) (regexp)
3334
(spec
3435
((deploy (After 1))
3536
(spec (Assoc ((Image (String prepor/condo-test:good)))))
36-
(health_timeout 10) (stop_timeout 10)))))
37+
(health_timeout 10) (stop_timeout 10)))
38+
(created_at .+) (stable_at (.+)))) (regexp)
3739
New instance from /tmp/condo_specs/spec2.edn with state Init
3840
Pulling image prepor/condo-test:good
3941
spec2 --> New state: (Wait
4042
((id .+) (regexp)
4143
(spec
4244
((deploy (After 1))
4345
(spec (Assoc ((Image (String prepor/condo-test:good)))))
44-
(health_timeout 10) (stop_timeout 10)))))
46+
(health_timeout 10) (stop_timeout 10)))
47+
(created_at .+) (stable_at ()))) (regexp)
4548
spec2 --> New state: (Stable
4649
((id .+) (regexp)
4750
(spec
4851
((deploy (After 1))
4952
(spec (Assoc ((Image (String prepor/condo-test:good)))))
50-
(health_timeout 10) (stop_timeout 10)))))
53+
(health_timeout 10) (stop_timeout 10)))
54+
(created_at .+) (stable_at (.+)))) (regexp)
5155
spec1 --> Stop
5256
spec1 --> New state: Init
5357
New instance from /tmp/condo_specs/spec1.edn with state Init
@@ -57,13 +61,15 @@ let%expect_test "basic" =
5761
(spec
5862
((deploy (After 1))
5963
(spec (Assoc ((Image (String prepor/condo-test:good)))))
60-
(health_timeout 10) (stop_timeout 10)))))
64+
(health_timeout 10) (stop_timeout 10)))
65+
(created_at .+) (stable_at ()))) (regexp)
6166
spec1 --> New state: (Stable
6267
((id .+) (regexp)
6368
(spec
6469
((deploy (After 1))
6570
(spec (Assoc ((Image (String prepor/condo-test:good)))))
66-
(health_timeout 10) (stop_timeout 10)))))
71+
(health_timeout 10) (stop_timeout 10)))
72+
(created_at .+) (stable_at (.+)))) (regexp)
6773
spec1 --> Stop
6874
spec1 --> New state: Init
6975
spec2 --> Stop

0 commit comments

Comments
 (0)