File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed
mulog-opentelemetry/test/com/brunobonacci/mulog/publishers Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change 3939
4040
4141
42+ (defn- change-permissions
43+ " Grant access to all, required because optel process starts with a different user
44+ in the docker container. The userid inside the container is 10001"
45+ [f]
46+ (java.nio.file.Files/setPosixFilePermissions
47+ (.toPath (io/file f))
48+ #{java.nio.file.attribute.PosixFilePermission/OWNER_READ
49+ java.nio.file.attribute.PosixFilePermission/OWNER_WRITE
50+ java.nio.file.attribute.PosixFilePermission/OWNER_EXECUTE
51+ java.nio.file.attribute.PosixFilePermission/GROUP_READ
52+ java.nio.file.attribute.PosixFilePermission/GROUP_WRITE
53+ java.nio.file.attribute.PosixFilePermission/GROUP_EXECUTE
54+ java.nio.file.attribute.PosixFilePermission/OTHERS_READ
55+ java.nio.file.attribute.PosixFilePermission/OTHERS_WRITE
56+ java.nio.file.attribute.PosixFilePermission/OTHERS_EXECUTE }))
57+
58+
4259(defn service-ready?
4360 [host port client-settings]
4461 (fn []
238255 (def test-id (f/flake ))
239256 (def test-dir (str " /tmp/optel-" test-id))
240257 (io/make-parents (io/file (str test-dir " /test" )))
258+ (change-permissions test-dir)
241259 (io/copy (io/file " ./test-config.yml" ) (io/file (str test-dir " /config.yml" )))
242260
243261 (def container (-> (tc/create
378396 :rdt/finalize
379397 ; ; stop publisher
380398 (publisher )
381- (tc/stop! container )
382- (rm-fr test-dir ))
399+ (rm-fr test-dir )
400+ (tc/stop! container ))
383401
384402
385403
388406 (def test-id (f/flake ))
389407 (def test-dir (str " /tmp/optel-" test-id))
390408 (io/make-parents (io/file (str test-dir " /test" )))
409+ (change-permissions test-dir)
391410 (io/copy (io/file " ./test-config.yml" ) (io/file (str test-dir " /config.yml" )))
392411
393412 (def container (-> (tc/create
514533 :rdt/finalize
515534 ; ; stop publisher
516535 (publisher )
517- (tc/stop! container )
518- (rm-fr test-dir ))
536+ (rm-fr test-dir )
537+ (tc/stop! container ))
You can’t perform that action at this time.
0 commit comments