Skip to content

Commit 910f5e7

Browse files
committed
** disable more tests
1 parent ccdb603 commit 910f5e7

File tree

3 files changed

+26
-21
lines changed

3 files changed

+26
-21
lines changed

ipoe/private/command/init.rkt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@
173173
(module+ test
174174
(require rackunit rackunit-abbrevs ipoe/private/util/check-print)
175175

176+
(define CI? (equal? "true" (getenv "CI")))
177+
176178
;; -- get-username
177179
(check-apply* (lambda (k1 k2)
178180
(check-print (list #rx"command-line$")
@@ -238,18 +240,20 @@
238240
;; -- psql-create-tables TODO
239241

240242
;; -- psql-installed?, pass (machine-dependent)
241-
(check-true
242-
(check-print
243-
(list #rx"^Checking for `psql`")
244-
psql-installed?))
243+
(when (not CI?)
244+
(check-true
245+
(check-print
246+
(list #rx"^Checking for `psql`")
247+
psql-installed?)))
245248

246249
;; -- psql-installed?, fail TODO
247250

248251
;; -- psql-running, pass (machine-dependent)
249-
(check-true
250-
(check-print
251-
(list #rx"^Checking for psql server")
252-
psql-running?))
252+
(when (not CI?)
253+
(check-true
254+
(check-print
255+
(list #rx"^Checking for psql server")
256+
psql-running?)))
253257

254258
;; -- save-config TODO
255259

ipoe/private/db.rkt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -864,11 +864,12 @@
864864
;; (thread-wait prompt-thread))))
865865

866866
;; -- with-ipoe-db, invalid user
867-
(parameterize ([*online?* #f])
868-
(check-exn #rx"^Failed to connect"
869-
(lambda ()
870-
(with-ipoe-db #:user "ANONSTEIN" #:dbname "MISSING-TABLE"
871-
(lambda () (void))))))
867+
(when (not CI?)
868+
(parameterize ([*online?* #f])
869+
(check-exn #rx"^Failed to connect"
870+
(lambda ()
871+
(with-ipoe-db #:user "ANONSTEIN" #:dbname "MISSING-TABLE"
872+
(lambda () (void)))))))
872873

873874
;; -- with-ipoe-db, online-mode, check that preferences are saved
874875
(with-config/cache [#f #f]

ipoe/private/parameters.rkt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -384,14 +384,14 @@
384384
(check-false (file-exists? g))
385385
(check-false (file-exists? l))
386386
;; -- create a dummy .ipoe file, to make sure init works
387-
(parameterize ([current-directory (find-system-path 'temp-dir)])
388-
(unless (file-exists? IPOE-CONFIG)
389-
(with-output-to-file IPOE-CONFIG
390-
(lambda () (displayln "#:test output"))))
391-
(define ln* (file->lines IPOE-CONFIG))
392-
(define o*+ (options-init))
393-
;; TODO not sure what expected should be
394-
(check-equal? (options-count o*+) (sub1 (length ln*))))]
387+
(define o*+
388+
(parameterize ([current-directory (find-system-path 'temp-dir)])
389+
(with-output-to-file IPOE-CONFIG #:exists 'replace
390+
(lambda () (displayln "#:test output")))
391+
(begin0
392+
(options-init)
393+
(delete-file IPOE-CONFIG))))
394+
(check-equal? (options-count o*+) 1)]
395395
[else
396396
;; -- Number of default options should be at least the length of
397397
;; each config file. (It's not the sum because duplicates don't

0 commit comments

Comments
 (0)