moving test apps into place with proper check_deploy scripts
This commit is contained in:
1
tests/apps/go/.godir
Normal file
1
tests/apps/go/.godir
Normal file
@@ -0,0 +1 @@
|
||||
go
|
||||
1
tests/apps/go/Procfile
Normal file
1
tests/apps/go/Procfile
Normal file
@@ -0,0 +1 @@
|
||||
web: go
|
||||
2
tests/apps/go/check_deploy
Executable file
2
tests/apps/go/check_deploy
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
set -e; test "$(curl -s $1)" == "go"
|
||||
20
tests/apps/go/web.go
Normal file
20
tests/apps/go/web.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
http.HandleFunc("/", hello)
|
||||
fmt.Println("listening...")
|
||||
err := http.ListenAndServe(":"+os.Getenv("PORT"), nil)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func hello(res http.ResponseWriter, req *http.Request) {
|
||||
fmt.Fprintln(res, "go")
|
||||
}
|
||||
@@ -1,3 +1,2 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
test "$(curl $1)" == "nodejs/express2"
|
||||
set -e; test "$(curl -s $1)" == "nodejs/express"
|
||||
2
tests/apps/php/check_deploy
Executable file
2
tests/apps/php/check_deploy
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
set -e; test "$(curl -s $1)" == "<html><h3>php</h3></html>"
|
||||
1
tests/apps/php/index.php
Normal file
1
tests/apps/php/index.php
Normal file
@@ -0,0 +1 @@
|
||||
<html><?php echo '<h3>php</h3>'; ?></html>
|
||||
1
tests/apps/python-flask/Procfile
Normal file
1
tests/apps/python-flask/Procfile
Normal file
@@ -0,0 +1 @@
|
||||
web: gunicorn hello:app
|
||||
2
tests/apps/python-flask/check_deploy
Executable file
2
tests/apps/python-flask/check_deploy
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
set -e; test "$(curl -s $1)" == "python/flask"
|
||||
8
tests/apps/python-flask/hello.py
Normal file
8
tests/apps/python-flask/hello.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import os
|
||||
from flask import Flask
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def hello():
|
||||
return 'python/flask'
|
||||
5
tests/apps/python-flask/requirements.txt
Normal file
5
tests/apps/python-flask/requirements.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
Flask==0.9
|
||||
Jinja2==2.6
|
||||
Werkzeug==0.8.3
|
||||
gunicorn==0.17.2
|
||||
|
||||
Reference in New Issue
Block a user