;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Tests for topham API. ;;; ;;; Copyright (c) 2019 Evan Hanson ;;; ;;; See LICENSE for details. ;;; (import (chicken process-context) (test) (topham)) (let ((topham "topham --help >/dev/null") (topham-usage "Usage: topham [options ...] command ...")) (import (chicken io) (chicken process)) (test 0 (system topham)) (let ((output (call-with-input-pipe "topham --help" read-lines))) (test-assert (member topham-usage output)))) (unless (get-environment-variable "SRHT_ACCESS_TOKEN") (print "skipping remaining tests (no access token)") (exit)) (let () (import (topham meta)) (test-assert (retrieve (profile))) (test-assert (retrieve (audit-log))) (test-assert (retrieve (ssh-keys))) (test-assert (retrieve (pgp-keys)))) (let () (import (topham paste)) (test-assert (retrieve (pastes)))) (test-exit)