Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use mock storage if in test env

  • Loading branch information...
commit 9b8a1114e1e1d4b14524c4c3cb553e1d2c7d730f 1 parent 07a7d3c
@leafo authored
Showing with 5 additions and 4 deletions.
  1. +1 −2  app.moon
  2. +4 −2 storage_bucket.moon
View
3  app.moon
@@ -1,7 +1,6 @@
-http = require "lapis.nginx.http"
with require "cloud_storage.http"
- .set http
+ .set require "lapis.nginx.http"
db = require "lapis.db"
lapis = require "lapis.init"
View
6 storage_bucket.moon
@@ -1,10 +1,12 @@
--
+config = require("lapis.config").get!
local bucket
-pcall ->
- bucket = require "secret.storage_bucket"
+unless config._name == "test"
+ pcall ->
+ bucket = require "secret.storage_bucket"
unless bucket
import MockStorage from require "cloud_storage.mock"
Please sign in to comment.
Something went wrong with that request. Please try again.