Skip to content

Instantly share code, notes, and snippets.

View kevholditch's full-sized avatar
💭
Eat sleep code repeat

Kevin Holditch kevholditch

💭
Eat sleep code repeat
View GitHub Profile
include classpath("application.conf")
node-address {
host = sqs
}
queues {
queue1 {}
}
services:
sns:
image: s12v/sns
ports:
- "9911:9911"
volumes:
- ./config/db.json:/etc/sns/db.json
depends_on:
- sqs
sqs:
aws sqs receive-message --queue-url http://localhost:9324/queue/queue1 --region elasticmq --endpoint-url http://localhost:9324 --no-verify-ssl --no-sign-request --attribute-names All --message-attribute-names All
func TestMain(m *testing.M) {
// setup
code := m.Run()
// teardown
os.Exit(code)
func TestMain(m *testing.M) {
testContext := containers.StartKong(GetEnvVarOrDefault("KONG_VERSION", defaultKongVersion))
err := os.Setenv(EnvKongAdminHostAddress, testContext.KongHostAddress)
if err != nil {
log.Fatalf("Could not set kong host address env variable: %v", err)
}
code := m.Run()
func Test_ApisGetById(t *testing.T) {
apiRequest := &ApiRequest{
Name: "test-" + uuid.NewV4().String(),
Hosts: []string{"example.com"},
Uris: []string{"/example"},
Methods: []string{"GET", "POST"},
UpstreamUrl: "http://localhost:4140/testservice",
StripUri: true,
PreserveHost: true,
Retries: 3,
server {
server_name notification_proxy;
listen 8117;
location / {
resolver 127.0.0.11 ipv6=off;
set_by_lua_block $proxy_addr {
return ngx.unescape_uri(ngx.var.arg_address)
}
#!/usr/local/bin/dumb-init /bin/bash
set -e
export DNS_ADDR=`cat /etc/resolv.conf | grep nameserver | cut -d' ' -f2-`
envsubst '$DNS_ADDR' < /etc/nginx/nginx.template > /usr/local/openresty/nginx/conf/nginx.conf
/usr/local/openresty/bin/openresty -g "daemon off;"
server {
server_name notification_proxy;
listen 8117;
location / {
resolver $DNS_ADDR ipv6=off;
set_by_lua_block $proxy_addr {
return ngx.unescape_uri(ngx.var.arg_address)
}
builds:
- binary: terraform-provider-kong
goos:
- darwin
- linux
- windows
goarch:
- amd64
archive:
format: zip