Skip to content

Commit 41749e3

Browse files
committed
chore: rm old implementation
1 parent eecb279 commit 41749e3

File tree

4 files changed

+22
-226
lines changed

4 files changed

+22
-226
lines changed

src/com/moclojer/components/consumer.clj

Lines changed: 0 additions & 109 deletions
This file was deleted.

src/com/moclojer/components/publisher.clj

Lines changed: 0 additions & 95 deletions
This file was deleted.

test/com/moclojer/components/database_test.clj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
(defn execute!
1212
[commands]
1313
(flow "makes database execution"
14-
[database (state-flow.api/get-state :database)]
15-
(-> database
16-
(database/execute commands)
17-
state-flow.api/return)))
14+
[database (state-flow.api/get-state :database)]
15+
(-> database
16+
(database/execute commands {})
17+
state-flow.api/return)))
1818

1919
(defn- create-and-start-system
2020
[]
@@ -29,10 +29,10 @@
2929
:fail-fast? true}
3030

3131
(flow "creates a table and insert a row and retreive"
32-
(execute! ["CREATE TABLE test (id SERIAL PRIMARY KEY, name VARCHAR(255))"])
32+
(execute! ["CREATE TABLE test (id SERIAL PRIMARY KEY, name VARCHAR(255))"])
3333

34-
(execute! ["INSERT INTO test (name) VALUES ('test')"])
34+
(execute! ["INSERT INTO test (name) VALUES ('test')"])
3535

36-
(match? [#:test {:name "test"
37-
:id 1}]
38-
(execute! ["SELECT * FROM test"]))))
36+
(match? [#:test {:name "test"
37+
:id 1}]
38+
(execute! ["SELECT * FROM test"]))))

test/com/moclojer/components/storage_test.clj

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
:cleanup utils/stop-system!
2222
:fail-fast? true}
2323
(flow
24-
"should create a file on storage and read it back"
25-
[storage (get-state :storage)]
26-
(state/invoke #(storage/create-bucket! storage "test"))
27-
(state/invoke #(do
24+
"should create a file on storage and read it back"
25+
[storage (get-state :storage)]
26+
(state/invoke #(storage/create-bucket! storage "test"))
27+
(state/invoke #(do
2828
;; wait for bucket creation
29-
(Thread/sleep 1000)
30-
(storage/upload! storage "test" "test.txt" "hello world!")))
31-
(match? "hello world!"
32-
(state/return
33-
(utils/exec-with-timeout
34-
#(some-> (storage/get-file storage "test" "test.txt")
35-
io/reader
36-
slurp)
37-
10000 500)))))
29+
(Thread/sleep 1000)
30+
(storage/upload! storage "test" "test.txt" "hello world!" {})))
31+
(match? "hello world!"
32+
(state/return
33+
(utils/exec-with-timeout
34+
#(some-> (storage/get-file storage "test" "test.txt")
35+
io/reader
36+
slurp)
37+
10000 500)))))

0 commit comments

Comments
 (0)