Coverage report: /home/ellis/comp/core/lib/pod/tests.lisp

KindCoveredAll%
expression07 0.0
branch00nil
Key
Not instrumented
Conditionalized out
Executed
Not executed
 
Both branches taken
One branch taken
Neither branch taken
1
 ;;; lib/pod/tests.lisp --- Pod tests
2
 
3
 ;;
4
 
5
 ;;; Code:
6
 (defpackage :pod/tests
7
   (:use :cl :rt :pod :sb-bsd-sockets)
8
   (:import-from :std :serde :serialize))
9
 
10
 (in-package :pod/tests)
11
 
12
 (defsuite :pod)
13
 (in-suite :pod)
14
 
15
 (deftest podman-api ()
16
   "Test the podman API over a local unix socket."
17
   (let ((local-socket (podman-local-user-socket)))
18
     (unless (probe-file local-socket)
19
       (start-podman-service local-socket)))
20
   (with-libpod-client (c)
21
     (is (string= "OK" (libpod-request c "_ping" :get)))
22
     (is (libpod-request-json c "info"))
23
     ;; (is (libpod-request-json c "events")) ;; hangs
24
     (is (libpod-request c "version"))
25
     (is (libpod-request-json c "containers/json"))))
26
 
27
 (defvar *test-containerfile* "ARG FOO=bar
28
 ARG BAR=foo
29
 FROM ${FOO}/${BAR}
30
 RUN sbcl
31
 ")
32
 
33
 (deftest containerfile ()
34
   "Roundtrip CONTAINERFILE tests."
35
   (let ((cf (serde *test-containerfile* (make-instance 'containerfile))))
36
     (is (= 2 (length (containerfile-args cf))))
37
     (is (string= "${FOO}/${BAR}" (containerfile-base cf)))
38
     (is (= 1 (length (containerfile-steps cf))))
39
     (is (string= *test-containerfile* (serialize cf :string)))))